]> git.mxchange.org Git - mailer.git/blobdiff - inc/filters.php
Naming convention, more usage of EL, new wrapper function introduced:
[mailer.git] / inc / filters.php
index 197d33ce46cbb19d62a115d094f161fa425aab9c..77a02c56cab62268ca3545ee5b3eaf5722ed7e84 100644 (file)
@@ -139,7 +139,7 @@ function FILTER_CALL_HANDLER_LOGIN_FAILTURES ($data) {
 
        // Handle failed logins here if not in guest
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "type=".$data['type'].",action=".getAction().",what=".getWhat().",level=".$data['access_level']."<br />");
-       if ((($data['type'] == 'what') || ($data['type'] == 'action') && ((!isWhatSet()) || (getWhat() == 'overview') || (getWhat() == getConfig('index_home')))) && ($data['access_level'] != 'guest') && ((isExtensionInstalledAndNewer('sql_patches', '0.4.7')) || (isExtensionInstalledAndNewer('admins', '0.7.0')))) {
+       if ((($data['type'] == 'what') || ($data['type'] == 'action') && ((!isWhatSet()) || (getWhat() == 'overview') || (getWhat() == getIndexHome()))) && ($data['access_level'] != 'guest') && ((isExtensionInstalledAndNewer('sql_patches', '0.4.7')) || (isExtensionInstalledAndNewer('admins', '0.7.0')))) {
                // Handle failure
                $content['content'] .= handleLoginFailures($data['access_level']);
        } // END - if
@@ -254,17 +254,20 @@ function FILTER_RUN_SQLS ($data) {
                                // Trim spaces away
                                $sql = trim($sql);
 
+                               // Is 'enable_codes' not set? Then set it to true
+                               if (!isset($data['enable_codes'])) $data['enable_codes'] = true;
+
                                // Is there still a query left?
                                if (!empty($sql)) {
                                        // Do we have an "ALTER TABLE" command?
                                        if (substr(strtolower($sql), 0, 11) == 'alter table') {
                                                // Analyse the alteration command
-                                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "Alterting table: {$sql}");
-                                               SQL_ALTER_TABLE($sql, __FUNCTION__, __LINE__);
+                                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Alterting table: ' . $sql . ',enable_codes=' . intval($data['enable_codes']));
+                                               SQL_ALTER_TABLE($sql, __FUNCTION__, __LINE__, $data['enable_codes']);
                                        } else {
                                                // Run regular SQL command
-                                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "Running regular query: {$sql}");
-                                               SQL_QUERY($sql, __FUNCTION__, __LINE__, false);
+                                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Running regular query: ' . $sql . ',enable_codes=' . intval($data['enable_codes']);
+                                               SQL_QUERY($sql, __FUNCTION__, __LINE__, $data['enable_codes']);
                                        }
                                } // END - if
                        } // END - foreach
@@ -304,7 +307,7 @@ function FILTER_UPDATE_LOGIN_DATA () {
                if (!isWhatSet()) {
                        // Fix it to default
                        setWhat('welcome');
-                       if (getConfig('index_home') != '') setWhatFromConfig('index_home');
+                       if (getIndexHome() != '') setWhatFromConfig('index_home');
                } // END - if
 
                // Update last module / online time