]> git.mxchange.org Git - mailer.git/blobdiff - inc/filters.php
More globals rewritten, see ticket #100
[mailer.git] / inc / filters.php
index 8d96ef26dab4d7c6d5ec625ff440f9ce83da6462..80e45043c371f3cf75eb6e0a291d9d11a58ba38a 100644 (file)
@@ -68,11 +68,11 @@ function INIT_FILTER_SYSTEM () {
        // Load all saved filers if sql_patches is updated
        if (GET_EXT_VERSION("sql_patches") >= "0.5.9") {
                // Init add
-               $ADD = "";
-               if (GET_EXT_VERSION("sql_patches") >= "0.6.0") $ADD = ", `filter_counter`";
+               $add = "";
+               if (GET_EXT_VERSION("sql_patches") >= "0.6.0") $add = ", `filter_counter`";
 
                // Load all active filers
-               $result = SQL_QUERY("SELECT `filter_name`,`filter_function`,`filter_active`".$ADD."
+               $result = SQL_QUERY("SELECT `filter_name`,`filter_function`,`filter_active`".$add."
 FROM `{!_MYSQL_PREFIX!}_filters`
 ORDER BY `filter_id` ASC", __FUNCTION__, __LINE__);
 
@@ -245,7 +245,7 @@ function FILTER_FLUSH_FILTERS () {
        INIT_SQLS();
 
        // Are we installing?
-       if (isInstalling()) {
+       if ((isInstalling()) || (!isInstalled())) {
                // Then silently skip this filter
                return true;
        } // END - if
@@ -485,7 +485,7 @@ function FILTER_UPDATE_LOGIN_DATA () {
                } // END - if
 
                // Update last module / online time
-               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET last_module='%s', last_online=UNIX_TIMESTAMP(), REMOTE_ADDR='%s' WHERE userid=%s LIMIT 1",
+               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `last_module`='%s', last_online=UNIX_TIMESTAMP(), REMOTE_ADDR='%s' WHERE userid=%s LIMIT 1",
                        array($GLOBALS['what'], GET_REMOTE_ADDR(), getUserId()), __FUNCTION__, __LINE__);
        }  else {
                // Destroy session, we cannot update!