// Pre-fetch cache here if found
if ($this->isCacheReadable()) $this->getArrayFromCache();
- //* DEBUG: */ print($cacheName.'='.intval($this->isCacheReadable()).'/'.intval(is_writeable($this->fqfn)).'/'.intval($this->extensionVersionMatches('cache')).'<br />');
- $this->status[$cacheName] = ($this->isCacheReadable() && (is_writeable($this->fqfn)) && ($this->extensionVersionMatches('cache')));
+ //* DEBUG: */ print($cacheName.'='.intval($this->isCacheReadable()).'/'.intval(is_writeable($this->fqfn)).'/'.intval(isExtensionInstalled('cache')).'/'.intval($this->extensionVersionMatches('cache')).'<br />');
+ $this->status[$cacheName] = ($this->isCacheReadable() && (is_writeable($this->fqfn)) && (isExtensionInstalled('cache')) && ($this->extensionVersionMatches('cache')));
} // END - if
//* DEBUG: */ print($cacheName.'='.intval($this->status[$cacheName]).'<br />');
$OUT = '';
// Do we have queries?
- if ((getExtensionVersion('sql_patches') >= '0.0.7') && (getConfig('verbose_sql') == 'Y')) {
+ if ((isExtensionInstalledAndNewer('sql_patches', '0.0.7')) && (getConfig('verbose_sql') == 'Y')) {
// Init switch color
$SW = 2;
// Load main template
$OUT = loadTemplate('admin_ext_sql_table', true, $content);
- } elseif ((getExtensionVersion('sql_patches') >= '0.0.7') && (getConfig('verbose_sql') == 'Y')) {
+ } elseif ((isExtensionInstalledAndNewer('sql_patches', '0.0.7')) && (getConfig('verbose_sql') == 'Y')) {
// No addional SQL commands to run
$OUT = loadTemplate('admin_settings_saved', true, getMessage('ADMIN_NO_ADDITIONAL_SQLS'));
} // END - if
// Init filters
registerFilter('init', 'LOAD_CONFIGURATION');
+ registerFilter('init', 'LOAD_RUNTIME_INCLUDES');
registerFilter('init', 'INIT_EXTENSIONS');
registerFilter('init', 'INIT_RANDOMIZER');
- registerFilter('init', 'LOAD_RUNTIME_INCLUDES');
registerFilter('init', 'INIT_RANDOM_NUMBER');
registerFilter('init', 'CHECK_SVN_REVISION');
registerFilter('init', 'RUN_DAILY_RESET');
die();
} // END - if
+// Init header
+$GLOBALS['page_header'] = '';
+
// Is the header already sent?
if (($GLOBALS['header_sent'] != 1) && ($GLOBALS['header_sent'] != 2)) {
// If not in CSS mode generate the header
// Try to login the admin by setting some session/cookie variables
function doAdminLogin ($adminLogin, $passHash) {
// Reset failure counter on matching admins version
- if ((isExtensionInstalledAndNewer('admins', '0.7.0')) && ((isExtensionOlder('sql_patches', '0.3.6')) || (!isExtensionInstalled('sql_patches')))) {
+ if ((isExtensionInstalledAndNewer('admins', '0.7.0')) && ((isExtensionInstalledAndOlder('sql_patches', '0.3.6')) || (!isExtensionInstalled('sql_patches')))) {
// Reset counter on out-dated sql_patches version
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admins` SET `login_failures`=0, `last_failure`='0000-00-00 00:00:00' WHERE `login`='%s' LIMIT 1",
array($adminLogin), __FUNCTION__, __LINE__);
}
// Add SQLs to a table
- if ((!empty($ext_name)) && (getExtensionVersion('sql_patches')) && (getConfig('verbose_sql') == 'Y')) {
+ if ((!empty($ext_name)) && (isExtensionInstalled('sql_patches')) && (getConfig('verbose_sql') == 'Y')) {
// Add verbose SQL table
- $text .= addExtensionVerboseSqlTable($title, " class=\"admin_table top left right\"", true, '100%') . "<br />\n";
+ $text .= addExtensionVerboseSqlTable($title, ' class="admin_table top left right"', true, '100%') . "<br />\n";
} // END - if
} elseif ((!empty($ext_name)) && (!empty($ext_ver))) {
// Run SQL commands in dry mode but only return the notes