Fixed wrong filter registrations
authorRoland Häder <roland@mxchange.org>
Wed, 25 Nov 2009 16:37:44 +0000 (16:37 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 25 Nov 2009 16:37:44 +0000 (16:37 +0000)
inc/extensions/ext-politician-stop.php
inc/extensions/ext-uberwach.php
inc/filter-functions.php

index dcf7fe1..2751759 100644 (file)
@@ -54,12 +54,12 @@ switch (getExtensionMode()) {
                addExtensionAdminMenuSql('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_UBERWACH_SNIPPET', false, true, getExtensionDryRun());
+               registerFilter('page_footer', 'DISPLAY_POLITICAN_STOP_SNIPPET', false, true, getExtensionDryRun());
                break;
 
        case 'remove': // Do stuff when removing extension
                // Unregister filter
-               unregisterFilter('page_footer', 'DISPLAY_UBERWACH_SNIPPET', false, true, getExtensionDryRun());
+               unregisterFilter('page_footer', 'DISPLAY_POLITICAN_STOP_SNIPPET', false, true, getExtensionDryRun());
                break;
 
        case 'activate': // Do stuff when admin activates this extension
index 08e1b3f..1682dcf 100644 (file)
@@ -57,7 +57,7 @@ switch (getExtensionMode()) {
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_uberwach' LIMIT 1");
 
                // Unregister filter
-               unregisterFilter('page_footer', 'DISPLAY_POLITICIAN_STOP_SNIPPET', false, true, getExtensionDryRun());
+               unregisterFilter('page_footer', 'DISPLAY_UBERWACH_SNIPPET', false, true, getExtensionDryRun());
                break;
 
        case 'activate': // Do stuff when admin activates this extension
@@ -71,7 +71,7 @@ switch (getExtensionMode()) {
        case 'update': // Update an extension
                switch (getCurrentExtensionVersion()) {
                        case '0.0.1': // SQL queries for v0.0.1
-                               registerFilter('page_footer', 'DISPLAY_POLITICIAN_STOP_SNIPPET', false, true, getExtensionDryRun());
+                               registerFilter('page_footer', 'DISPLAY_UBERWACH_SNIPPET', false, true, getExtensionDryRun());
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Filter zum Anzeigen des Snippets hinzugef&uuml;gt");
index 4c3cae0..41e5ade 100644 (file)
@@ -232,7 +232,7 @@ function unregisterFilter ($filterName, $filterFunction, $force = false, $dry_ru
        // Is that filter there?
        if ((!isset($GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction])) && ($force === false)) {
                // Not found, so abort here
-               addFatalMessage(__FUNCTION__, __LINE__, getMessage('FILTER_FAILED_NOT_REMOVED'), array($filterFunction, $filterName));
+               addFatalMessage(__FUNCTION__, __LINE__, sprintf(getMessage('FILTER_FAILED_NOT_REMOVED'), $filterFunction, $filterName));
                return false;
        } // END - if