mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Fixed feature to add cron extension in meta. Tiquet: #3669
(cherry picked from commit cefbc70ede686ab6548c7b426b9a7277abee00fa)
This commit is contained in:
parent
d9b2c33059
commit
ec0015d6a4
@ -93,10 +93,23 @@ function extensions_is_extension ($page) {
|
|||||||
* @param bool $enterprise
|
* @param bool $enterprise
|
||||||
*/
|
*/
|
||||||
function extensions_get_extensions ($enterprise = false) {
|
function extensions_get_extensions ($enterprise = false) {
|
||||||
|
|
||||||
$dir = EXTENSIONS_DIR;
|
$dir = EXTENSIONS_DIR;
|
||||||
|
$master_dir = ENTERPRISE_DIR . '/' . EXTENSIONS_DIR;
|
||||||
$handle = false;
|
$handle = false;
|
||||||
if ($enterprise)
|
if ($enterprise) {
|
||||||
$dir = ENTERPRISE_DIR.'/'.EXTENSIONS_DIR;
|
$dir = ENTERPRISE_DIR . '/' . EXTENSIONS_DIR;
|
||||||
|
if (defined("METACONSOLE")) {
|
||||||
|
$dir = '../' . EXTENSIONS_DIR;
|
||||||
|
$master_dir = '../' . EXTENSIONS_DIR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (defined("METACONSOLE")) {
|
||||||
|
$dir = '../../' . $dir;
|
||||||
|
$master_dir = '../' . EXTENSIONS_DIR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (file_exists ($dir))
|
if (file_exists ($dir))
|
||||||
$handle = @opendir ($dir);
|
$handle = @opendir ($dir);
|
||||||
@ -134,7 +147,7 @@ function extensions_get_extensions ($enterprise = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Load extensions in enterprise directory */
|
/* Load extensions in enterprise directory */
|
||||||
if (! $enterprise && file_exists (ENTERPRISE_DIR.'/'.EXTENSIONS_DIR))
|
if (! $enterprise && file_exists ($master_dir))
|
||||||
return array_merge ($extensions, extensions_get_extensions (true));
|
return array_merge ($extensions, extensions_get_extensions (true));
|
||||||
|
|
||||||
return $extensions;
|
return $extensions;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user