]> git.mxchange.org Git - mailer.git/blobdiff - inc/pool/pool-user.php
More globals rewritten, see #100
[mailer.git] / inc / pool / pool-user.php
index 96b1280cbde6e427871b06109c6158ed358bfd0a..224595067631be5c3cfbc823fb8cf59710e84f36 100644 (file)
@@ -47,8 +47,6 @@ if (defined('__DAILY_RESET')) {
 }
 
 // Need this here
-global $REPLACER;
-
 // Check for freed mail orders to send out
 if (EXT_IS_ACTIVE("html_mail")) {
        //                                0     1        2      3       4          5            6      7        8          9       10
@@ -59,7 +57,7 @@ if (EXT_IS_ACTIVE("html_mail")) {
 }
 
 // Reset variables
-$cnt2 = 0; $LAST_SENT_ID = 0; $cnt_back = array("0"); $pointsBack = array("0");
+$cnt2 = 0; $lastSentId = 0; $cnt_back = array("0"); $pointsBack = array("0");
 if (SQL_NUMROWS($result_main) > 0) {
        // Parse all mails
        while ($DATA = SQL_FETCHROW($result_main)) {
@@ -137,7 +135,7 @@ if (SQL_NUMROWS($result_main) > 0) {
                                                        $DATA[14] = TRANSLATE_GENDER($gender);
 
                                                        // Replace text variables
-                                                       foreach ($REPLACER as $key => $value) {
+                                                       foreach ($GLOBALS['replacer'] as $key => $value) {
                                                                if (isset($DATA[$key])) $DATA[3] = str_replace($value, $DATA[$key], $DATA[3]);
                                                        } // END - if
 
@@ -189,8 +187,8 @@ if (SQL_NUMROWS($result_main) > 0) {
                                        }
 
                                        // Do we have reached the maximum to send mails? || (getConfig('max_send') >= $GLOBALS['pool_cnt'])
-                                       //* DEBUG: */ echo "*L:".__LINE__."/".$GLOBALS['pool_cnt'].">=".$DATA[8]."/".getConfig('max_send').">=".$GLOBALS['pool_cnt']."/".$LAST_SENT_ID."!=".$DATA[0]."*<br />";
-                                       if ((($GLOBALS['pool_cnt'] >= $DATA[8])) && ($LAST_SENT_ID != $DATA[0])) {
+                                       //* DEBUG: */ echo "*L:".__LINE__."/".$GLOBALS['pool_cnt'].">=".$DATA[8]."/".getConfig('max_send').">=".$GLOBALS['pool_cnt']."/".$lastSentId."!=".$DATA[0]."*<br />";
+                                       if ((($GLOBALS['pool_cnt'] >= $DATA[8])) && ($lastSentId != $DATA[0])) {
                                                // Prepare content
                                                $content = array(
                                                        'sender_uid' => $DATA[1],
@@ -230,7 +228,7 @@ if (SQL_NUMROWS($result_main) > 0) {
                                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_stats` SET timestamp_send=UNIX_TIMESTAMP() WHERE pool_id=%s LIMIT 1",
                                                        array(bigintval($DATA[0])), __FILE__, __LINE__);
 
-                                               $LAST_SENT_ID = $DATA[0]; $GLOBALS['pool_cnt'] = 0;
+                                               $lastSentId = $DATA[0]; $GLOBALS['pool_cnt'] = 0;
                                                $cnt2 += $GLOBALS['pool_cnt'];
 
                                                // Update mediadata if version is 0.0.4 or higher