More globals rewritten, see #100
[mailer.git] / inc / libs / task_functions.php
index dd7e3249de297c851e1bfbcacb61a760ac77533e..cfd0277d8da639c02c7230404a11b497c43445f9 100644 (file)
@@ -336,15 +336,15 @@ ORDER BY d.userid";
                }
 
                // Autopurge installed?
-               $LAST = "";
+               $lastOnline = "";
                if ((EXT_IS_ACTIVE("autopurge")) && (getConfig('autopurge_inactive') == "Y") && (getConfig('ap_inactive_since') > 0)) {
                        // Use last online timestamp to keep inactive members away from here
-                       $LAST   = sprintf(" AND last_online >= (UNIX_TIMESTAMP() - %s)", getConfig('ap_inactive_since'));
+                       $lastOnline   = sprintf(" AND last_online >= (UNIX_TIMESTAMP() - %s)", getConfig('ap_inactive_since'));
                }
 
                $SQLs[]   = "SELECT ".$USE." AS points
 FROM `{!_MYSQL_PREFIX!}_user_data`
-WHERE `status`='CONFIRMED' AND ".$USE.">0".$LAST."
+WHERE `status`='CONFIRMED' AND ".$USE.">0".$lastOnline."
 ORDER BY points DESC, userid";
                $WHATs[]  = "list_bonus";
                $DESCRs[] = getMessage('ADMIN_TASK_LIST_BONUS');
@@ -355,14 +355,14 @@ ORDER BY points DESC, userid";
                // Begging rallye
 
                // Autopurge installed?
-               $LAST = "";
+               $lastOnline = "";
                if ((EXT_IS_ACTIVE("autopurge")) && (getConfig('autopurge_inactive') == "Y") && (getConfig('ap_inactive_since') > 0)) {
                        // Use last online timestamp to keep inactive members away from here
-                       $LAST   = sprintf(" AND last_online >= (UNIX_TIMESTAMP() - %s)", getConfig('ap_inactive_since'));
+                       $lastOnline   = sprintf(" AND last_online >= (UNIX_TIMESTAMP() - %s)", getConfig('ap_inactive_since'));
                }
 
                $SQLs[]   = "SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data`
-WHERE `status`='CONFIRMED' AND beg_points>0".$LAST."
+WHERE `status`='CONFIRMED' AND beg_points>0".$lastOnline."
 ORDER BY beg_points DESC, userid";
                $WHATs[]  = "list_beg";
                $DESCRs[] = getMessage('ADMIN_TASK_LIST_BEG');