diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index fc50cef2015..23c6e0fc606 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -369,7 +369,14 @@ if ($mode != 4) { if (preg_match('/^([^@]+)@([^@]+)$/i',$urlpage,$regs)) { - print ''.img_picto($langs->trans("Setup"),"setup").' '; + if (file_exists(DOL_URL_ROOT.'/'.$regs[2].'/admin/'.$regs[1])) + { + print ''.img_picto($langs->trans("Setup"),"setup").' '; + } + else + { + print ''.img_picto($langs->trans("Setup"),"setup").' '; + } } else { @@ -381,7 +388,14 @@ if ($mode != 4) } else if (preg_match('/^([^@]+)@([^@]+)$/i',$objMod->config_page_url,$regs)) { - print '
';
+ if (file_exists(DOL_URL_ROOT.'/'.$regs[2].'/img/object_'.$regs[1]))
+ {
+ return '
';
+ }
+ else
+ {
+ return '
';
+ }
}
return '
';
diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php
index 0c726232467..922692c8864 100644
--- a/htdocs/master.inc.php
+++ b/htdocs/master.inc.php
@@ -104,7 +104,8 @@ if (empty($dolibarr_main_data_root))
define('DOL_DOCUMENT_ROOT', $dolibarr_main_document_root); // Filesystem core php (htdocs)
define('DOL_DATA_ROOT', $dolibarr_main_data_root); // Filesystem data (documents)
define('DOL_CLASS_PATH', 'class/'); // Filesystem path to class dir
-define('DOL_CUSTOM_PATH', $dolibarr_main_document_root.'/custom'); // Filesystem path to custom dir
+define('DOL_CUSTOM_PATH', DOL_DOCUMENT_ROOT . '/custom'); // Filesystem path to custom dir
+define('DOL_EXTMODULE_ROOT', DOL_CUSTOM_PATH . '/modules'); // Filesystem path to external modules dir
// If dolibarr_main_url_root = auto (Hidden feature for developers only), we try to forge it.
if ($dolibarr_main_url_root == 'auto' && ! empty($_SERVER["SCRIPT_URL"]) && ! empty($_SERVER["SCRIPT_URI"]))
{