Moved filter function back to filters.php, fix for non-installed ext-sql_patches
authorRoland Häder <roland@mxchange.org>
Wed, 28 Oct 2009 03:19:23 +0000 (03:19 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 28 Oct 2009 03:19:23 +0000 (03:19 +0000)
inc/filter-functions.php
inc/filters.php
inc/language/de.php
inc/modules/admin/admin-inc.php

index e65b789167c411a17bd3fc2165084f7eda160ac6..dca5b9ec6cff5fa9a013f1e610180f905c8194ce 100644 (file)
@@ -197,7 +197,7 @@ function registerFilter ($filterName, $filterFunction, $silentAbort = true, $for
                // Is the function there?
                if (!function_exists($filterFunction)) {
                        // Then abort here
-                       addFatalMessage(__FUNCTION__, __LINE__, sprintf(getMessage('FILTER_FAILED_404'), $filterFunction, $filterName));
+                       addFatalMessage(__FUNCTION__, __LINE__, sprintf("Filter function %s could not be added to filter chain %s.", $filterFunction, $filterName));
                        return false;
                } // END - if
 
index 4380a52ba341912cd0b7f7ff4bbb2ae0bf349350..c90cdea9be9e0a8415ab65e87fb65a53da0e35fa 100644 (file)
@@ -659,5 +659,27 @@ function FILTER_LOAD_RUNTIME_INCLUDES () {
        //* DEBUG: */ die();
 }
 
+// Filter for checking admin ACL
+function FILTER_CHECK_ADMIN_ACL () {
+       // Extension not installed so it's always allowed to access everywhere!
+       $ret = true;
+
+       // Ok, Cookie-Update done
+       if ((isExtensionInstalledAndNewer('admins', '0.3.0')) && (isExtensionActive('admins'))) {
+               // Check if action GET variable was set
+               $action = getAction();
+               if (isWhatSet()) {
+                       // Get action value by what-value
+                       $action = getModeAction('admin', getWhat());
+               } // END - if
+
+               // Check for access control line of current menu entry
+               $ret = adminsCheckAdminAcl($action, getWhat());
+       } // END - if
+
+       // Set it here
+       $GLOBALS['acl_allow'] = $ret;
+}
+
 // [EOF]
 ?>
index 5adaa10fafbc0304b029877c9bde9aa57a20e42e..8762613836335ef1a12f87c4e18bc8119e0ff656 100644 (file)
@@ -1176,7 +1176,6 @@ addMessages(array(
 // Filter sub-system
        'FILTER_FAILED_ALREADY_INIT' => "Filter-System ist bereits initialisiert.",
        'FILTER_FAILED_ALREADY_ADDED' => "Die Filterfunktion <span class=\"data\">%s</span> ist bereits der Filterkette <span class=\"data\">%s</span> hinzugef&uuml;gt.",
-       'FILTER_FAILED_404' => "Die Filterfunktion <span class=\"data\">%s</span> wurde nicht gefunden und konnte der Filterkette <span class=\"data\">%s</span> nicht hinzugef&uuml;gt werden.",
        'FILTER_FAILED_NO_FILTER_FOUND' => "Die Filterkette <span class=\"data\">%s</span> konnte nicht gefunden werden.",
        'FILTER_FAILED_NOT_REMOVED' => "Die Filterfunktion <span class=\"data\">%s</span> konnte nicht aus der Filterkette <span class=\"data\">%s</span> entfernt werden, da sie nicht existiert.",
        'FILTER_FLUSH_FAILED_NO_DATABASE' => "Kann die Filterketten nicht speichern. Datenbank fehlt!",
index ffdab4e9b2be7d23068c1312fe87fe32158bc6c4..4ee9340b32aba67d244665a28f9d4423c5d8d428 100644 (file)
@@ -1211,7 +1211,7 @@ function doResetAdminPassword ($login, $password) {
        $passHash = '';
 
        // Now check if we have sql_patches installed
-       if (getExtensionVersion('sql_patches') >= '0.3.6') {
+       if (isExtensionInstalledAndNewer('sql_patches', '0.3.6')) {
                // Use new way of hashing
                $passHash = generateHash($password);
        } else {
@@ -1295,31 +1295,5 @@ function adminCreateUserLink ($userid) {
        return '{?URL?}/modules.php?module=admin&amp;what=list_user';
 }
 
-// -----------------------------------------------------------------------------
-// ---                           Filter functions                            ---
-// -----------------------------------------------------------------------------
-
-// Filter for checking admin ACL
-function FILTER_CHECK_ADMIN_ACL () {
-       // Extension not installed so it's always allowed to access everywhere!
-       $ret = true;
-
-       // Ok, Cookie-Update done
-       if ((isExtensionInstalledAndNewer('admins', '0.3.0')) && (isExtensionActive('admins'))) {
-               // Check if action GET variable was set
-               $action = getAction();
-               if (isWhatSet()) {
-                       // Get action value by what-value
-                       $action = getModeAction('admin', getWhat());
-               } // END - if
-
-               // Check for access control line of current menu entry
-               $ret = adminsCheckAdminAcl($action, getWhat());
-       } // END - if
-
-       // Set it here
-       $GLOBALS['acl_allow'] = $ret;
-}
-
 // [EOF]
 ?>