]> git.mxchange.org Git - mailer.git/commitdiff
More double->single convertions
authorRoland Häder <roland@mxchange.org>
Wed, 29 Jul 2009 19:52:38 +0000 (19:52 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 29 Jul 2009 19:52:38 +0000 (19:52 +0000)
inc/extensions/ext-doubler.php
inc/libs/doubler_functions.php
inc/libs/surfbar_functions.php
inc/modules/admin/what-config_doubler.php
inc/modules/admin/what-config_holiday.php
inc/modules/admin/what-config_order.php
inc/modules/guest/what-doubler.php
inc/modules/member/what-doubler.php
inc/reset/reset_holiday.php

index 000c807957771ce112d69e6ab73f58c89dc1807c..7d9f864f515fb8e6c2cdea1a201de7d47453c7bd 100644 (file)
@@ -243,7 +243,7 @@ PRIMARY KEY(id)
                                        break;
 
                                default: // Do stuff when extension is loaded
-                                       if ((isResetModeEnabled()) && (getConfig('doubler_send_mode') == "RESET")) {
+                                       if ((isResetModeEnabled()) && (getConfig('doubler_send_mode') == 'RESET')) {
                                                // So let's check for points
                                                ADD_INC_TO_POOL(sprintf("%sinc/doubler_send.php", constant('PATH')));
                                        }
index e7b890c039ab4da30a7770e6a9d21d821f386713..78464b4f93a8984fd89044d02588ec6000e3854b 100644 (file)
@@ -44,13 +44,13 @@ if (!defined('__SECURITY')) {
 
 // Generates a HTML table based on given data
 // @TODO Lame description
-function DOUBLER_GENERATE_TABLE ($uid = '0', $done='N', $ref='N', $sort="ASC") {
+function DOUBLER_GENERATE_TABLE ($uid = '0', $done = 'N', $ref = 'N', $sort = 'ASC') {
        if (empty($cnt)) $cnt = 0;
        $add = ''; $DT_MODE = 0;
        if ($uid > 0) {
                // Load entries only from a single user
                $add = " AND `userid`='".bigintval($uid)."'";
-               $mode = 'member'; $COLS = "4"; $DT_MODE = '2';
+               $mode = 'member'; $COLS = '4'; $DT_MODE = '2';
                $NOT_FOUND = getMessage('DOUBLER_MEMBER_NO_ENTRIES_FOUND');
        } else {
                // Guest mode!
@@ -58,13 +58,13 @@ function DOUBLER_GENERATE_TABLE ($uid = '0', $done='N', $ref='N', $sort="ASC") {
                $NOT_FOUND = getMessage('DOUBLER_GUEST_NO_ENTRIES_FOUND');
        }
 
-       if (($done == 'Y') && ($sort == "ASC")) {
+       if (($done == 'Y') && ($sort == 'ASC')) {
                // Already payed out points (latest payouts first)
                $limit = getConfig('doubler_display_old');
-       } elseif ($sort == "ASC") {
+       } elseif ($sort == 'ASC') {
                // List entries which will receive their payout soon
                $limit = getConfig('doubler_display_pay');
-       } elseif ($sort == "DESC") {
+       } elseif ($sort == 'DESC') {
                // Newest entries
                $limit = getConfig('doubler_display_new');
        }
@@ -97,7 +97,7 @@ LIMIT ".$limit, __FUNCTION__, __LINE__);
                        );
 
                        // Load template and switch color
-                       $OUT .= LOAD_TEMPLATE($mode."_doubler_list_rows", true, $content);
+                       $OUT .= LOAD_TEMPLATE($mode . '_doubler_list_rows', true, $content);
                        $SW = 3 - $SW;
                }
 
@@ -113,7 +113,7 @@ LIMIT ".$limit, __FUNCTION__, __LINE__);
        }
 
        // Return template
-       return LOAD_TEMPLATE($mode."_doubler_list", true, $OUT);
+       return LOAD_TEMPLATE($mode . '_doubler_list', true, $OUT);
 }
 
 //
@@ -124,7 +124,7 @@ function DOUBLER_GET_TOTAL_POINTS_LEFT() {
        if (getConfig('doubler_own') == 'Y') {
                // Take points from doubler's own account
                $points += getConfig('doubler_points') - getConfig('doubler_used');
-       }
+       } // END - if
 
        if (getConfig('doubler_jackpot') == 'Y') {
                // Load jackpot
@@ -137,7 +137,7 @@ function DOUBLER_GET_TOTAL_POINTS_LEFT() {
 
        if (getConfig('doubler_uid') > 0) {
                // Get user's points
-               $user = GET_TOTAL_DATA(getConfig('doubler_uid'), "user_points", "points");
+               $user = GET_TOTAL_DATA(getConfig('doubler_uid'), 'user_points', 'points');
                $points += $user;
        }
 
index f04a3b7a91a02029d66ab4a4b7addc73290e7321..20f540223fd6711c63dc9958d4f92958f126af78 100644 (file)
@@ -540,7 +540,7 @@ function SURFBAR_LOOKUP_BY_URL ($url, $uid) {
 }
 
 // Load URL data by given search term and column
-function SURFBAR_GET_URL_DATA ($searchTerm, $column='id', $order='id', $sort="ASC", $group='id', $add = '') {
+function SURFBAR_GET_URL_DATA ($searchTerm, $column = 'id', $order = 'id', $sort = 'ASC', $group = 'id', $add = '') {
        // By default nothing is found
        $GLOBALS['last_url_data'] = array();
 
index bd1bb4c49c2d2e74400e68df55a0f7bd9656ab64..e230bd18443c56095d8cf99561ae78a7e6226b4d 100644 (file)
@@ -108,7 +108,7 @@ if (isFormSent()) {
                        define('__DOUBLER_SEND_RESET' , '');
                        break;
 
-               case "RESET":
+               case 'RESET':
                        define('__DOUBLER_SEND_DIRECT', '');
                        define('__DOUBLER_SEND_RESET' , ' checked="checked"');
                        break;
index 21d9a2798fadf59986ce53733cde27fc0d6316f4..4b28ce9e57dbe80e73b2806a63206764ac73e29f 100644 (file)
@@ -54,7 +54,7 @@ if (isFormSent()) {
        define('__LOCKED'   , createTimeSelections(getConfig('holiday_lock')  , "holiday_lock"  , "WDh"));
 
        switch (getConfig('holiday_mode')) {
-               case "RESET":
+               case 'RESET':
                        define('__RESET_DEFAULT' , ' checked="checked"');
                        define('__DIRECT_DEFAULT', '');
                        break;
index 03a1d0dad0f9b464dd605eec922810508d19ce70..3c1032bcfb6a473df7346f2e9652a3d5e546efc6 100644 (file)
@@ -67,12 +67,12 @@ if (isFormSent()) {
 
        // Sorting mode (ascending / descending)
        switch (getConfig('order_mode')) {
-               case "ASC":
+               case 'ASC':
                        define('__ASC_DEFAULT' , ' selected="selected"');
                        define('__DESC_DEFAULT', '');
                        break;
 
-               case "DESC":
+               case 'DESC':
                        define('__ASC_DEFAULT' , '');
                        define('__DESC_DEFAULT', ' selected="selected"');
                        break;
@@ -130,7 +130,7 @@ if (isFormSent()) {
        define('__ORDER_SELECT', ORDER_SELECT_OPTION_LIST(getConfig('order_select')));
 
        // Load template
-       LOAD_TEMPLATE("admin_config_order");
+       LOAD_TEMPLATE('admin_config_order');
 }
 
 //
index 418557d367a1439c6c265262d6d951d29ee4b901..3c08ac964f045f5e8538b27482767f463f6b9788 100644 (file)
@@ -62,19 +62,18 @@ define('__REFID', $GLOBALS['refid']);
 define('__DOUBLER_COUNTER', getConfig('doubler_counter'));
 
 // Which mail-send-mode did the admin setup?
-switch (getConfig('doubler_send_mode'))
-{
-       case "DIRECT":
+switch (getConfig('doubler_send_mode')) {
+       case 'DIRECT':
                define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_DIRECT);
                break;
 
-       case "RESET":
+       case 'RESET':
                define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_RESET);
                break;
 }
 
 // Generate table with already payed out doubles
-define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE('0', 'Y', 'N', "DESC"));
+define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE('0', 'Y', 'N', 'DESC'));
 
 // Generate table with next-to-run payouts
 define('__DOUBLER_PAYOUT_NEXT', DOUBLER_GENERATE_TABLE());
@@ -86,7 +85,7 @@ define('__TIMEOUT_MARK', createFancyTime(getConfig('doubler_timeout')));
 define('__LEFT_VALUE', DOUBLER_GET_TOTAL_POINTS_LEFT());
 
 // Load template
-LOAD_TEMPLATE("guest_doubler");
+LOAD_TEMPLATE('guest_doubler');
 
 //
 ?>
index d9fe1ec430cc5725b1038d998c3212dd159975c2..190efc40c25e81056c117dd7b72708f51a91458a 100644 (file)
@@ -79,11 +79,11 @@ define('__DOUBLER_COUNTER', translateComma(getConfig('doubler_counter')));
 
 // Which mail-send-mode did the admin setup?
 switch (getConfig('doubler_send_mode')) {
-       case "DIRECT":
+       case 'DIRECT':
                define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_DIRECT'));
                break;
 
-       case "RESET":
+       case 'RESET':
                define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_RESET'));
                break;
 
@@ -94,13 +94,13 @@ switch (getConfig('doubler_send_mode')) {
 }
 
 // Generate table with already payed out doubles
-define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE(getUserId(), 'Y', 'N', "DESC"));
+define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE(getUserId(), 'Y', 'N', 'DESC'));
 
 // Generate table with next-to-run payouts
 define('__DOUBLER_PAYOUT_NEXT', DOUBLER_GENERATE_TABLE(getUserId()));
 
 // Generate table with refferal payouts
-define('__DOUBLER_PAYOUT_REF', DOUBLER_GENERATE_TABLE(getUserId(), 'N', 'Y', "DESC"));
+define('__DOUBLER_PAYOUT_REF', DOUBLER_GENERATE_TABLE(getUserId(), 'N', 'Y', 'DESC'));
 
 // Generate timemark
 define('__TIMEOUT_MARK', createFancyTime(getConfig('doubler_timeout')));
@@ -109,7 +109,7 @@ define('__TIMEOUT_MARK', createFancyTime(getConfig('doubler_timeout')));
 define('__LEFT_VALUE', translateComma(DOUBLER_GET_TOTAL_POINTS_LEFT()));
 
 // Load template
-LOAD_TEMPLATE("member_doubler");
+LOAD_TEMPLATE('member_doubler');
 
 //
 ?>
index b1fbc5d8270e47985d50d4be0da900843d5e63aa..d61b400649120891095ea72f72d9bcba4cb91981 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if ((getOutputMode() == 1) || ((!isResetModeEnabled()) && (getConfig('holiday_mode') == "RESET"))) return;
+if ((getOutputMode() == 1) || ((!isResetModeEnabled()) && (getConfig('holiday_mode') == 'RESET'))) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Check for holidays we need to enable and send email to user