]> git.mxchange.org Git - mailer.git/blobdiff - inc/filters.php
Fixed wrong handling of nickname in member login
[mailer.git] / inc / filters.php
index 254630b39eb25aca5da88beeb32fc74b9b8a978f..b58a126ced7c8d5560c60d8e4721242611db15fa 100644 (file)
@@ -165,10 +165,12 @@ function FILTER_REDIRECT_TO_LOGOUT_SQL_PATCHES () {
 
 // Filter for auto-activation of a extension
 function FILTER_AUTO_ACTIVATE_EXTENSION ($data) {
+       // Debug message
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $data['ext_name'] . ',isExtensionAlwaysActive()=' . intval(isExtensionAlwaysActive()));
+
        // Is this extension always activated?
        if (isExtensionAlwaysActive()) {
                // Then activate the extension
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "ext_name={$data['ext_name']}<br />");
                doActivateExtension($data['ext_name']);
        } // END - if
 
@@ -242,13 +244,16 @@ function FILTER_LOAD_INCLUDES ($pool) {
 // Filter for running SQL commands
 function FILTER_RUN_SQLS ($data) {
        // Debug message
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "- Entered!");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '- Entered!');
 
        // Is the array there?
        if ((isSqlsValid()) && ((!isset($data['dry_run'])) || ($data['dry_run'] == false))) {
                // Run SQL commands
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "- Found ".countSqls()." queries to run.");
-               foreach (getSqls() as $sqls) {
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '- Found ' . countSqls() . ' queries to run.');
+               foreach (getSqls() as $mode=>$sqls) {
+                       // Debug message
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'mode=' . $mode . ',count()=' . count($sqls));
+
                        // New cache format...
                        foreach ($sqls as $sql) {
                                // Trim spaces away
@@ -266,7 +271,7 @@ function FILTER_RUN_SQLS ($data) {
                                                SQL_ALTER_TABLE($sql, __FUNCTION__, __LINE__, $data['enable_codes']);
                                        } else {
                                                // Run regular SQL command
-                                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Running regular query: ' . $sql . ',enable_codes=' . intval($data['enable_codes']);
+                                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Running regular query: ' . $sql . ',enable_codes=' . intval($data['enable_codes']));
                                                SQL_QUERY($sql, __FUNCTION__, __LINE__, $data['enable_codes']);
                                        }
                                } // END - if
@@ -275,7 +280,7 @@ function FILTER_RUN_SQLS ($data) {
        } // END - if
 
        // Debug message
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "- Left!");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '- Left!');
 }
 
 // Filter for updating/validating login data
@@ -497,7 +502,7 @@ function FILTER_COMPILE_EXPRESSION_CODE ($code) {
                        } // END - if
 
                        // Construct call-back function name for the command
-                       $commandFunction = 'doExpression' . ucfirst(strtolower($cmd));
+                       $commandFunction = 'doExpression' . capitalizeUnderscoreString($cmd);
 
                        // Is this function there?
                        if (function_exists($commandFunction)) {