// Extensions are all inactive/not installed during installation
} else {
// Look in database
- $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `ext_name`='%s' LIMIT 1",
- array($ext_name), __FILE__, __LINE__);
+ $ext_id = getExtensionId($ext_name);
// Do we have a record?
- $isInstalled = (SQL_NUMROWS($result) == 1);
+ $isInstalled = ($ext_id > 0);
// Is it installed, then cache the entry
if ($isInstalled === true) {
getExtensionId($ext_name, true);
} // END - if
- // Free result
- SQL_FREERESULT($result);
-
// Remember the status
$GLOBALS['ext_is_installed'][$ext_name] = $isInstalled;
}
// Cache it
$GLOBALS['cache_array']['extension']['ext_id'][$ext_name] = $ret;
- }
-
- if ($ret == 0) {
- // We should fix these all!
- debug_report_bug(__FUNCTION__ . ': Invalid extension name found. ext_name=' . $ext_name);
+ } else {
+ // Caching enabled but no cache found is bad
+ debug_report_bug(__FUNCTION__ . ': Cache not found but ext-cache is active. ext_name=' . $ext_name);
} // END - if
// Return value