More fixes for updating from older revisions
authorRoland Häder <roland@mxchange.org>
Wed, 16 Dec 2009 00:34:10 +0000 (00:34 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 16 Dec 2009 00:34:10 +0000 (00:34 +0000)
inc/extensions-functions.php
inc/extensions/ext-politician-stop.php
inc/extensions/ext-uberwach.php
inc/filter-functions.php

index c34db3b0b3e6968812dde7bf0be8347194616fc2..ed0c0e8baee9c538350c195d1b82fd7cbfb8f093 100644 (file)
@@ -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
index c21ca022d35aa4b7a8a09ddf4b00c12ded9edfca..7c63ac001339180ce1407f813a7015db532c60b8 100644 (file)
@@ -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 &quot;Politiker-Stopp - Jetzt wird zur&uuml;ck zensiert.&quot;', 7);
+               addAdminMenuSql('config','config_politician_stop','Politiker-Stopp-Aktion','Einstellungen zur Satire-Aktion &quot;Politiker-Stopp - Jetzt wird zur&uuml;ck zensiert.&quot;', 7);
 
                // Register filter
                registerFilter('page_footer', 'DISPLAY_POLITICIAN_STOP_SNIPPET', false, true, getExtensionDryRun());
index 4f3b4410909f5b8e46ab2c18321b16f47a665872..b7a745e68a6339d788f70f6f560f16fa26ec0cf7 100644 (file)
 // 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','&Uuml;berwach!-Aktion','Einstellungen zur Aktion &quot;&Uuml;berwach!&quot;', 7);
+                               addAdminMenuSql('config','config_uberwach','&Uuml;berwach!-Aktion','Einstellungen zur Aktion &quot;&Uuml;berwach!&quot;', 7);
                                break;
                } // END - switch
                break;
index 509196238260f3ab56da0b569a75353a2e973488..280afbbfc984136aa33bbaa40ed7aa192e8d0e4c 100644 (file)
@@ -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(),