]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/rallye_functions.php
Mailer project continued:
[mailer.git] / inc / libs / rallye_functions.php
index d88550529135925a0f2b1c34c20220e7978217d1..e768e226c7acd48069c0715663cdaf245e6ee8a7 100644 (file)
@@ -91,7 +91,7 @@ WHERE
 LIMIT 1",
                        array(bigintval($content['id']), bigintval($content['userid'])), __FUNCTION__, __LINE__);
 
-               // Do we have an entry?
+               // Is there an entry?
                if (SQL_HASZERONUMS($result_ref)) {
                        // Add userid and his ref count to table
                        $result_ref = SQL_QUERY_ESC("SELECT 
@@ -378,7 +378,7 @@ function addUserToReferralRallye ($userid, $content = array()) {
 
        // Updated extension?
        if (isExtensionInstalledAndNewer('rallye', '0.2.0')) {
-               $add .= ',`min_users`,`min_prices`';
+               $add .= ',`min_users`, `min_prices`';
        } // END - if
 
        // Check for an auto-add rallye
@@ -610,7 +610,7 @@ function getReferralRallyeUserDataFromArray ($userIds) {
 
        // Load users
        $result = SQL_QUERY_ESC("SELECT
-       `userid`,`gender`,`surname`,`family`,`email`
+       `userid`, `gender`, `surname`, `family`, `email`
 FROM
        `{?_MYSQL_PREFIX?}_user_data`
 WHERE
@@ -650,7 +650,9 @@ function getArrayFromReferralRallyePrices ($rallye) {
 
        // Load prices
        $result = SQL_QUERY_ESC("SELECT
-       `price_level`,`points`,`info`
+       `price_level`,
+       `points`,
+       `info`
 FROM
        `{?_MYSQL_PREFIX?}_rallye_prices`
 WHERE
@@ -907,7 +909,7 @@ function addReferralRallyeTemplateSelection ($name = 'template', $default = '')
                }
        } // END - foreach
 
-       // Do we have found templates which we can link with the new rallye?
+       // Is there found templates which we can link with the new rallye?
        if (!empty($ral[0])) {
                // Generate selection box for all found templates
                $OUT  = '<select class="form_select" name="' . $name . '" size="1">';
@@ -929,7 +931,7 @@ function getReferralRallyeRefsCount ($currUserid, $oldReferralCount = '0') {
                // Get refs from cache
                $count = '0';
                foreach ($GLOBALS['cache_array']['refsystem']['userid'] as $id => $userid) {
-                       // Do we have a ref for this user?
+                       // Is there a ref for this user?
                        //* DEBUG: */ debugOutput('id='.$id.',userid='.$userid.',userid='.$userid.',oldReferralCount='.$oldReferralCount.',level='.$GLOBALS['cache_array']['refsystem']['level'][$id]);
                        if (($currUserid == $userid) && ($GLOBALS['cache_array']['refsystem']['level'][$id] == 1)) {
                                //* DEBUG: */ debugOutput('userid matches!');
@@ -1025,7 +1027,7 @@ function determineReferralRallyeMinimumPrices ($min_prices) {
 
 // "Getter" for total rallye prices by given id
 function getTotalRallyePrices ($rallyeId) {
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__][$rallyeId])) {
                // Determine it
                $GLOBALS[__FUNCTION__][$rallyeId] = countSumTotalData($rallyeId, 'rallye_prices', 'id', 'rallye_id', true);