Rewrote 'we' word a little, rewrote mail order to use SQL_INSERTID() instead of anoth...
[mailer.git] / inc / libs / sponsor_functions.php
index ee1f9050b9f01966cb2a485522809b272feaf72b..3e5909476677b783bf26173550e8b80e698556aa 100644 (file)
@@ -71,9 +71,9 @@ function handleSponsorRequest ($postData, $update=false, $messageArray = array()
                                                        // Email address is not valid
                                                        $SAVE = false;
                                                } else {
-                                                       // Do we want to add a new sponsor or update his data?
+                                                       // Add a new sponsor or update his data?
                                                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE email='%s' LIMIT 1",
-                                                       array($postData['email']), __FUNCTION__, __LINE__);
+                                                               array($postData['email']), __FUNCTION__, __LINE__);
 
                                                        // Is a sponsor alread in the db?
                                                        if (SQL_NUMROWS($result) == 1) {
@@ -242,7 +242,7 @@ function translateSponsorStatus ($status) {
 
 // Search for an email address in the database
 function isSponsorRegisteredWithEmail ($email) {
-       // Do we already have the provided email address in our DB?
+       // Is there already the provided email address in database?
        $ret = (countSumTotalData($email, 'sponsor_data', 'id', 'email', true) == 1);
 
        // Return result
@@ -627,7 +627,7 @@ function doExpressionSponsor ($data) {
 
        // Sponsor-related data, so is there a sponsor_id?
        if (!empty($data['matches'][4][$data['key']])) {
-               // Do we have a sponsor_id or $sponsor_id?
+               // Is there a sponsor_id or $sponsor_id?
                if ($data['matches'][4][$data['key']] == '$userid') {
                        // Use dynamic call
                        $functionName = "getFetchedSponsorData('id', \$userid, '" . $data['callback'] . "')";
@@ -640,7 +640,7 @@ function doExpressionSponsor ($data) {
                $functionName = "getSponsorData('" . $data['callback'] . "')";
        }
 
-       // Do we have another function to run (e.g. translations)
+       // Is there another function to run (e.g. translations)
        if (!empty($data['extra_func'])) {
                // Surround the original function call with it
                $functionName = $data['extra_func'] . '(' . $functionName . ')';
@@ -689,7 +689,7 @@ function fetchSponsorData ($sponsor_id, $column = 'id') {
        $result = SQL_QUERY_ESC("SELECT *".$ADD." FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `%s`='%s' LIMIT 1",
                array($column, $sponsor_id), __FUNCTION__, __LINE__);
 
-       // Do we have a record?
+       // Is there a record?
        if (SQL_NUMROWS($result) == 1) {
                // Load data from cookies
                $data = SQL_FETCHARRAY($result);
@@ -808,7 +808,7 @@ function isCurrentSponsorIdSet () {
 
 // Is given sponsor_id valid?
 function isValidSponsorId ($sponsor_id) {
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__][$sponsor_id])) {
                // Check it out
                $GLOBALS[__FUNCTION__][$sponsor_id] = ((!is_null($sponsor_id)) && (!empty($sponsor_id)) && ($sponsor_id > 0));
@@ -853,7 +853,7 @@ function destroySponsorSession () {
 
 // Getter for sponsor_min_points
 function getSponsorMinPoints () {
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__])) {
                // Determine it
                $GLOBALS[__FUNCTION__] = getConfig('sponsor_min_points');
@@ -865,7 +865,7 @@ function getSponsorMinPoints () {
 
 // Getter for sponsor_ref_points
 function getSponsorRefPoints () {
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__])) {
                // Determine it
                $GLOBALS[__FUNCTION__] = getConfig('sponsor_ref_points');