} // END - if
}
// Check if given extension is active
-function EXT_IS_ACTIVE ($ext_name, $ignore_admin = false, $ignore_cache = false) {
+function EXT_IS_ACTIVE ($ext_name) {
global $cacheArray, $_CONFIG;
// Extensions are all inactive during installation
if ((!isBooleanConstantAndTrue('mxchange_installed')) || (isBooleanConstantAndTrue('mxchange_installing')) || (empty($ext_name))) return false;
- // Extension's file name will also be checked
- $file = sprintf("%sinc/extensions/ext-%s.php", PATH, $ext_name);
- if (!FILE_READABLE($file)) return false;
- //* DEBUG: */ echo "*".$ext_name."(".count($cacheArray).")<br />";
-
// Not active is the default
$active = "N";
// Check cache
- if ((!empty($cacheArray['extensions']['ext_active'][$ext_name])) && (!$ignore_cache)) {
+ if (!empty($cacheArray['extensions']['ext_active'][$ext_name])) {
// Load from cache
//* DEBUG: */ echo "CACHE! ext_name={$ext_name}<br />\n";
$active = $cacheArray['extensions']['ext_active'][$ext_name];
//DEBUG_LOG(__FUNCTION__.": ext_name={$ext_name},active={$active}");
// Is this extension activated? (For admins we always have active extensions...)
- return (
- (
- $active == "Y"
- ) && (
- FILE_READABLE($inc)
- )
- );
+ return ($active == "Y");
}
// Get version from extensions
function GET_EXT_VERSION ($ext_name) {