diff --git a/htdocs/api/admin/explorer.php b/htdocs/api/admin/explorer.php
index 835a5485544..53b9233c130 100644
--- a/htdocs/api/admin/explorer.php
+++ b/htdocs/api/admin/explorer.php
@@ -41,8 +41,7 @@ $langs->load("admin");
*/
// Enable and test if module Api is enabled
-if (empty($conf->global->MAIN_MODULE_API))
-{
+if (empty($conf->global->MAIN_MODULE_API)) {
dol_syslog("Call Dolibarr API interfaces with module REST disabled");
print $langs->trans("WarningModuleNotActive", 'Api').'.
';
print $langs->trans("ToActivateModule");
@@ -59,20 +58,16 @@ $api->r->addAuthenticationClass('DolibarrApiAccess', '');
$listofapis = array();
$modulesdir = dolGetModulesDirs();
-foreach ($modulesdir as $dir)
-{
+foreach ($modulesdir as $dir) {
/*
- * Search available module
- */
+ * Search available module
+ */
//dol_syslog("Scan directory ".$dir." for API modules");
$handle = @opendir(dol_osencode($dir));
- if (is_resource($handle))
- {
- while (($file = readdir($handle)) !== false)
- {
- if (is_readable($dir.$file) && preg_match("/^(mod.*)\.class\.php$/i", $file, $reg))
- {
+ if (is_resource($handle)) {
+ while (($file = readdir($handle)) !== false) {
+ if (is_readable($dir.$file) && preg_match("/^(mod.*)\.class\.php$/i", $file, $reg)) {
$modulename = $reg[1];
// Defined if module is enabled
@@ -96,60 +91,58 @@ foreach ($modulesdir as $dir)
$module = 'fichinter';
}
- if (empty($conf->$module->enabled)) $enabled = false;
+ if (empty($conf->$module->enabled)) {
+ $enabled = false;
+ }
if ($enabled) {
/*
- * If exists, load the API class for enable module
- *
- * Search files named api_