]> git.mxchange.org Git - mailer.git/blobdiff - inc/pool/pool-bonus.php
Caching of expensive PHP functions:
[mailer.git] / inc / pool / pool-bonus.php
index 65b4e36774bc95500ad7dfcf101e77b73124f080..c213c83e659721d5a9efbbff98924be00b4d758e 100644 (file)
@@ -90,7 +90,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                                // Load personal data
                                if (fetchUserData($userid)) {
                                        // The final receiver does exists so we can continue...
-                                       //* DEBUG: */ print("OK!/L:".__LINE__."<br />");
+                                       //* DEBUG: */ debugOutput('OK!/L:'.__LINE__);
 
                                        // Mark this user as "spammed" ;-) And place a line for him...
                                        if (removeReceiver($dummy, $key, $userid, $DATA['id'], $DATA['id'], true) == 'done') {
@@ -123,7 +123,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                                                // Do we have send maximum mails?
                                                if (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || (countSelection($dummy) == 0)) {
                                                        // Yes, we have
-                                                       //* DEBUG: */ print("*EXIT/L:".__LINE__."<br />");
+                                                       //* DEBUG: */ debugOutput('*EXIT/L:'.__LINE__);
                                                        break;
                                                } // END - if
                                        } // END - if
@@ -135,12 +135,12 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                                // Update entry (or add missing
                                $P = $GLOBALS['pool_cnt'];
                                if (!empty($cnt2) && empty($GLOBALS['pool_cnt'])) $P = $cnt2;
-                               //* DEBUG: */ print("+MEDIA/L:".__LINE__.'/'.$P."+<br />");
+                               //* DEBUG: */ debugOutput('+MEDIA/L:'.__LINE__.'/'.$P.'+');
                                updateMediadataEntry(array('total_send', 'bonus_send'), 'add', $P);
                        } // END - if
 
                        // Close sending system
-                       //* DEBUG: */ print("-L:".__LINE__.'/'.countSelection($dummy)."-<br />");
+                       //* DEBUG: */ debugOutput('-L:'.__LINE__.'/'.countSelection($dummy).'-');
                        if (countSelection($dummy) == 0) {
                                // Queue reached!
                                SQL_QUERY_ESC("UPDATE
@@ -153,12 +153,12 @@ WHERE
        `id`=%s
 LIMIT 1",
                                        array(bigintval($DATA['id'])), __FILE__, __LINE__);
-                               //* DEBUG: */ print("*L:".__LINE__."*<br />");
+                               //* DEBUG: */ debugOutput('*L:'.__LINE__.'*');
 
                                // Update mediadata if version is 0.0.4 or higher
                                if (isExtensionInstalledAndNewer('mediadata', '0.0.4')) {
                                        // Update entry (or add missing)
-                                       //* DEBUG: */ print("*MEDIA/L:".__LINE__."*<br />");
+                                       //* DEBUG: */ debugOutput('*MEDIA/L:'.__LINE__.'*');
                                        updateMediadataEntry(array('total_orders', 'bonus_orders'), 'add', 1);
                                } // END - if
                        } elseif ($GLOBALS['pool_cnt'] >= getConfig('max_send')) {
@@ -177,9 +177,7 @@ LIMIT 1",
                                                implode(';', $dummy),
                                                bigintval($DATA['id'])
                                        ), __FILE__, __LINE__);
-                               //* DEBUG: */ print("*L:".__LINE__."<pre>");
-                               //* DEBUG: */ print(print_r($dummy, true));
-                               //* DEBUG: */ print("</pre>\n!!!<br />");
+                               //* DEBUG: */ debugOutput('*L:'.__LINE__.'<pre>'.print_r($dummy, true).'</pre>!!!');
                                break;
                        }
                } // END - while