X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Floader%2Fload-extension.php;h=aad9cd0ab782e5fac67a1cd14bf99c64592449d4;hb=668d3df20156d5dbd4f34342eeadcbd5d420a8f5;hp=0d83fcd4227caddecfad066c952226d02e28d419;hpb=c3b4eaf29946349ff058691db2dcb615a5379bb2;p=mailer.git diff --git a/inc/loader/load-extension.php b/inc/loader/load-extension.php index 0d83fcd422..aad9cd0ab7 100644 --- a/inc/loader/load-extension.php +++ b/inc/loader/load-extension.php @@ -40,10 +40,10 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} // END - if - -// Use this code if you don't want to run this cache loader on installation phase -if (isInstallationPhase()) return; +} elseif (isInstallationPhase()) { + // Use this code if you don't want to run this cache loader on installation phase + return; +} // Next cached table is the extension if (($GLOBALS['cache_instance']->loadCacheFile('extension')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) { @@ -59,48 +59,48 @@ if (($GLOBALS['cache_instance']->loadCacheFile('extension')) && ($GLOBALS['cache $EXT_NAMES = array(); // Loop through all - foreach ($EXT_DUMMY['ext_name'] as $k => $name) { + foreach ($EXT_DUMMY['ext_name'] as $k => $ext_name) { // Load CSS file - if ($EXT_DUMMY['ext_css'][$k] == 'Y') addExtensionCssFile($name . '.css'); + if ($EXT_DUMMY['ext_css'][$k] == 'Y') addExtensionCssFile($ext_name . '.css'); // Load extension file itself if (($EXT_DUMMY['ext_active'][$k] == 'Y') || ($EXT_DUMMY['ext_keep'][$k] == 'Y')) { - $EXT_POOL[] = $name; + $EXT_POOL[] = $ext_name; } // END - if // Version number - $EXT_DUMMY['ext_version'][$name] = $EXT_DUMMY['ext_version'][$k]; + $EXT_DUMMY['ext_version'][$ext_name] = $EXT_DUMMY['ext_version'][$k]; unset($EXT_DUMMY['ext_version'][$k]); // Extension is active - $EXT_DUMMY['ext_active'][$name] = $EXT_DUMMY['ext_active'][$k]; + $EXT_DUMMY['ext_active'][$ext_name] = $EXT_DUMMY['ext_active'][$k]; unset($EXT_DUMMY['ext_active'][$k]); // Ext menu - $EXT_DUMMY['ext_menu'][$name] = $EXT_DUMMY['ext_menu'][$k]; + $EXT_DUMMY['ext_menu'][$ext_name] = $EXT_DUMMY['ext_menu'][$k]; unset($EXT_DUMMY['ext_menu'][$k]); // Language file - $EXT_DUMMY['ext_lang'][$name] = $EXT_DUMMY['ext_lang'][$k]; + $EXT_DUMMY['ext_lang'][$ext_name] = $EXT_DUMMY['ext_lang'][$k]; unset($EXT_DUMMY['ext_lang'][$k]); // Functions file - $EXT_DUMMY['ext_func'][$name] = $EXT_DUMMY['ext_func'][$k]; + $EXT_DUMMY['ext_func'][$ext_name] = $EXT_DUMMY['ext_func'][$k]; unset($EXT_DUMMY['ext_func'][$k]); // Extension id - $EXT_DUMMY['ext_id'][$name] = $EXT_DUMMY['ext_id'][$k]; - $id = $EXT_DUMMY['ext_id'][$name]; + $EXT_DUMMY['ext_id'][$ext_name] = $EXT_DUMMY['ext_id'][$k]; + $id = $EXT_DUMMY['ext_id'][$ext_name]; unset($EXT_DUMMY['ext_id'][$k]); // Add ext name - $EXT_NAMES[$id] = $name; + $EXT_NAMES[$id] = $ext_name; // Add deprecated flag (defaults to 'not deprecated') - $EXT_DUMMY['ext_deprecated'][$name] = 'N'; + $EXT_DUMMY['ext_deprecated'][$ext_name] = 'N'; // Mark it as active extension - $GLOBALS['cache_array']['always_active'][$name] = $EXT_DUMMY['ext_keep'][$k]; + $GLOBALS['cache_array']['always_active'][$ext_name] = $EXT_DUMMY['ext_keep'][$k]; unset($EXT_DUMMY['ext_keep'][$k]); // Remove unneccessary data from memory @@ -166,10 +166,12 @@ if (($GLOBALS['cache_instance']->loadCacheFile('extension')) && ($GLOBALS['cache } // END - if // Transfer EXT_ALWAYS_ACTIVE flag - $content['ext_keep'] = getExtensionAlwaysActive(); + $content['ext_keep'] = getThisExtensionAlwaysActive(); // Fix missing ext_css - if (!isset($content['ext_css'])) $content['ext_css'] = 'N'; + if (!isset($content['ext_css'])) { + $content['ext_css'] = 'N'; + } // END - if // Add row to cache file $GLOBALS['cache_instance']->addRow($content);