return false;
} // END - if
- // Construct FQFN for extension file
- $FQFN = sprintf("%sinc/extensions/ext-%s.php",
- constant('PATH'),
- $ext_name
- );
+ // Construct include filename and FQFN for extension file
+ $INC = sprintf("inc/extensions/ext-%s.php", $ext_name);
+ $FQFN = constant('PATH') . $INC;
// Is the extension file NOT there?
- if (!FILE_READABLE($FQFN)) {
+ if (!INCLUDE_READABLE($INC)) {
// Debug message
DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Extension %s not found.", $ext_name));
// Count cache hits
incrementConfigEntry('cache_hits');
- } elseif ((!isset($GLOBALS['cache_instance'])) || (!is_object($GLOBALS['cache_instance']))) {
+ } elseif (!isCacheInstanceValid()) {
// Load from database
$result = SQL_QUERY_ESC("SELECT ext_version FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name='%s' LIMIT 1",
array($ext_name), __FILE__, __LINE__);