]> git.mxchange.org Git - mailer.git/blobdiff - inc/pool/pool-user.php
More globals rewritten, see ticket #100
[mailer.git] / inc / pool / pool-user.php
index 224595067631be5c3cfbc823fb8cf59710e84f36..78434638f5fe999d643da4eb9ec1b86bbfc0975f 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Sendet freigegebene Mitglieder-Mails aus Pool    *
  * -------------------------------------------------------------------- *
- *                                                                      *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * Needs to be in all Files and every File needs "svn propset           *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2008 by Roland Haeder                           *
  * For more information visit: http://www.mxchange.org                  *
@@ -38,7 +43,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Don't run on daily reset
-if (defined('__DAILY_RESET')) {
+if (isResetModeEnabled()) {
        // Skip here
        return false;
 } elseif (!EXT_IS_ACTIVE("user")) {
@@ -244,9 +249,9 @@ if (SQL_NUMROWS($result_main) > 0) {
                                        // Do we have send maximum mails?
                                         elseif (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || ($cnt2 >= getConfig('max_send'))) {
                                                // There are some mails left to send for next round, so we reset the status back to NEW (=still not fully delivered)
-                                               $ADD = "";
-                                               if ($GLOBALS['pool_cnt'] <= $DATA[8]) $ADD = ", target_send=target_send-".$GLOBALS['pool_cnt'];
-                                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET data_type='NEW', receivers='%s'".$ADD." WHERE id=%s LIMIT 1",
+                                               $add = "";
+                                               if ($GLOBALS['pool_cnt'] <= $DATA[8]) $add = ", target_send=target_send-".$GLOBALS['pool_cnt'];
+                                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET data_type='NEW', receivers='%s'".$add." WHERE id=%s LIMIT 1",
                                                 array(implode(";", $dummy), bigintval($DATA[0])), __FILE__, __LINE__);
 
                                                //* DEBUG: */ echo"*EXIT/L:".__LINE__."*<br />";
@@ -288,7 +293,7 @@ if (SQL_NUMROWS($result_main) > 0) {
        }
 
        // Do we have points to "pay back"?
-       if ((sizeof($pointsBack) > 0) && (!empty($pointsBack[0]))) {
+       if ((count($pointsBack) > 0) && (!empty($pointsBack[0]))) {
                // Walk through all points
                foreach ($pointsBack as $uid => $PB) {
                        // Add points only when we have points left to add and a valid user ID