]> git.mxchange.org Git - mailer.git/blobdiff - inc/pool/pool-bonus.php
More double- to single-quotes rewritten
[mailer.git] / inc / pool / pool-bonus.php
index 4753a3a01a000438af6ab930de8cfcb79e1911ec..579b138ad5f8fa202d7f7e8b47cec44847000f77 100644 (file)
@@ -10,7 +10,7 @@
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Sendet freigegebene Bonus-Mails aus dem Pool     *
  * -------------------------------------------------------------------- *
- * $Revision:: 856                                                    $ *
+ * $Revision::                                                        $ *
  * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
@@ -38,7 +38,7 @@
 
 // Some security stuff...
 if (!defined('__SECURITY')) {
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
 }
 
@@ -46,7 +46,7 @@ if (!defined('__SECURITY')) {
 if (isResetModeEnabled()) {
        // Skip here
        return false;
-} elseif (!EXT_IS_ACTIVE("bonus")) {
+} elseif (!EXT_IS_ACTIVE('bonus')) {
        // Abort if extension bonus is not active
        return false;
 }
@@ -55,7 +55,7 @@ if (isResetModeEnabled()) {
 // Only send bonus mail when bonus extension is active and maximum send-mails is not reached
 if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
        // Do we need to send out bonus mails?
-       if (EXT_IS_ACTIVE("html_mail")) {
+       if (EXT_IS_ACTIVE('html_mail')) {
                //                                 0     1       2        3        4      5       6          7       8      9         10         11
                $result_bonus = SQL_QUERY("SELECT id, subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, html_msg FROM `{!_MYSQL_PREFIX!}_bonus` WHERE data_type='NEW' ORDER BY timestamp DESC", __FILE__, __LINE__);
        } else {
@@ -65,7 +65,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
 
        if (SQL_NUMROWS($result_bonus) > 0) {
                // Send these mails away...
-               $cnt2 = "";
+               $cnt2 = '';
                while ($DATA = SQL_FETCHARRAY($result_bonus)) {
                        // Compile URL
                        $DATA['url'] = COMPILE_CODE($DATA['url']);
@@ -75,9 +75,9 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                                array(bigintval($DATA['id'])), __FILE__, __LINE__);
 
                        // "Explode" all receivers into an array
-                       if (ereg(";", $DATA['receivers'])) {
+                       if (ereg(';', $DATA['receivers'])) {
                                // There's more than one receiver in the list...
-                               $RECEIVERS = explode(";", $DATA['receivers']);
+                               $RECEIVERS = explode(';', $DATA['receivers']);
                        } elseif (!empty($DATA['points'])) {
                                // Only one user left
                                $RECEIVERS = array($DATA['receivers']);
@@ -133,7 +133,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                                                // Count one up and remove entry from dummy array
                                                $GLOBALS['pool_cnt']++; unset($dummy[$key]);
 
-                                               if (GET_EXT_VERSION("user") >= "0.1.4") {
+                                               if (GET_EXT_VERSION('user') >= '0.1.4') {
                                                        // Update mails received for receiver
                                                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1",
                                                                array(bigintval($uid)), __FILE__, __LINE__);
@@ -153,12 +153,12 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                        }
 
                        // Update mediadata if version is 0.0.4 or higher
-                       if (GET_EXT_VERSION("mediadata") >= "0.0.4") {
+                       if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
                                // Update entry (or add missing
                                $P = $GLOBALS['pool_cnt'];
                                if (!empty($cnt2) && empty($GLOBALS['pool_cnt'])) $P = $cnt2;
                                //* DEBUG: */ echo "+MEDIA/L:".__LINE__."/".$P."+<br />";
-                               MEDIA_UPDATE_ENTRY(array("total_send", "bonus_send"), "add", $P);
+                               MEDIA_UPDATE_ENTRY(array("total_send", "bonus_send"), 'add', $P);
                        } // END - if
 
                        // Close sending system
@@ -170,15 +170,15 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                                //* DEBUG: */ echo "*L:".__LINE__."*<br />";
 
                                // Update mediadata if version is 0.0.4 or higher
-                               if (GET_EXT_VERSION("mediadata") >= "0.0.4") {
+                               if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
                                        // Update entry (or add missing)
                                        //* DEBUG: */ echo "*MEDIA/L:".__LINE__."*<br />";
-                                       MEDIA_UPDATE_ENTRY(array("total_orders", "bonus_orders"), "add", 1);
+                                       MEDIA_UPDATE_ENTRY(array("total_orders", "bonus_orders"), 'add', 1);
                                } // END - if
                        } elseif ($GLOBALS['pool_cnt'] >= getConfig('max_send')) {
                                // Update bonus pool
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET data_type='NEW', target_send=%s, receivers='%s' WHERE id=%s LIMIT 1",
-                                       array(SELECTION_COUNT($dummy), implode(";", $dummy), bigintval($DATA['id'])), __FILE__, __LINE__);
+                                       array(SELECTION_COUNT($dummy), implode(';', $dummy), bigintval($DATA['id'])), __FILE__, __LINE__);
                                //* DEBUG: */ echo "*L:".__LINE__."<pre>";
                                //* DEBUG: */ print_r($dummy);
                                //* DEBUG: */ echo "</pre>\n!!!<br />";