From 5fa8c7bab284e1549611b733d09364c39a437e2d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 16 Dec 2009 00:34:10 +0000 Subject: [PATCH] More fixes for updating from older revisions --- inc/extensions-functions.php | 2 +- inc/extensions/ext-politician-stop.php | 2 +- inc/extensions/ext-uberwach.php | 8 ++++---- inc/filter-functions.php | 7 ++++++- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index c34db3b0b3..ed0c0e8bae 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -988,7 +988,7 @@ function ifModuleHasMenu ($mod, $forceDb = false) { $ret = in_array($mod, array('admin', 'index', 'login', 'sponsor')); // Then there is a menu! } else { // Unsupported state! - debug_report_bug('This should never be reached.'); + logDebugMessage(__FUNCTION__, __LINE__, 'This should never be reached.'); } // Return status diff --git a/inc/extensions/ext-politician-stop.php b/inc/extensions/ext-politician-stop.php index c21ca022d3..7c63ac0013 100644 --- a/inc/extensions/ext-politician-stop.php +++ b/inc/extensions/ext-politician-stop.php @@ -51,7 +51,7 @@ switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `politician_stop_backlink` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionAdminMenuSql('config','config_politician_stop','Politiker-Stopp-Aktion','Einstellungen zur Satire-Aktion "Politiker-Stopp - Jetzt wird zurück zensiert."', 7); + addAdminMenuSql('config','config_politician_stop','Politiker-Stopp-Aktion','Einstellungen zur Satire-Aktion "Politiker-Stopp - Jetzt wird zurück zensiert."', 7); // Register filter registerFilter('page_footer', 'DISPLAY_POLITICIAN_STOP_SNIPPET', false, true, getExtensionDryRun()); diff --git a/inc/extensions/ext-uberwach.php b/inc/extensions/ext-uberwach.php index 4f3b441090..b7a745e68a 100644 --- a/inc/extensions/ext-uberwach.php +++ b/inc/extensions/ext-uberwach.php @@ -39,13 +39,13 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} +} // END - if // Version number -setThisExtensionVersion('0.0.1'); +setThisExtensionVersion('0.0.2'); // Version history array (add more with , '0.1.0' and so on) -setExtensionVersionHistory(array('0.0', '0.0.1')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2')); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) @@ -79,7 +79,7 @@ switch (getExtensionMode()) { case '0.0.2': // SQL queries for v0.0.2 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `uberwach_backlink` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionAdminMenuSql('config','config_uberwach','Überwach!-Aktion','Einstellungen zur Aktion "Überwach!"', 7); + addAdminMenuSql('config','config_uberwach','Überwach!-Aktion','Einstellungen zur Aktion "Überwach!"', 7); break; } // END - switch break; diff --git a/inc/filter-functions.php b/inc/filter-functions.php index 5091962382..280afbbfc9 100644 --- a/inc/filter-functions.php +++ b/inc/filter-functions.php @@ -242,7 +242,6 @@ function runFilterChain ($filterName, $data = null) { // Log it away... logDebugMessage(__FUNCTION__, __LINE__, 'Filter chain ' . $filterName . ' not found!'); } // END - if - if ($filterName == 'sql_admin_extra_data') debug_report_bug(print_r($GLOBALS['cache_array']['filter'] , true)); // Abort here and return content return $data; @@ -297,6 +296,12 @@ function countFilterUsage ($filterName, $filterFunction) { // Prepares the filter array for usage function prepareFilterArray () { + // Abort here if array is absend (e.g. not cached) + if (!isset($GLOBALS['cache_array']['filter']['filter_name'])) { + // Abort silently + return false; + } // END - if + // Init dummy array $filterArray = array( 'chains' => array(), -- 2.39.5