}
// 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
}
// 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)) {
$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
}
// 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],
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