]> git.mxchange.org Git - mailer.git/blobdiff - inc/wrapper-functions.php
Theoretical working merge of mailid.php and mailid_top.php into mailid.php + a couple...
[mailer.git] / inc / wrapper-functions.php
index 1593901d6a293938a3a367b21c3906357b164cd4..35af66dc4477c33836cfe9c47105bf21ee5b8b7e 100644 (file)
@@ -407,6 +407,18 @@ function isDebugModeEnabled () {
        return $GLOBALS[__FUNCTION__];
 }
 
+// Checks whether the debug hourly is enabled
+function isDebugHourlyEnabled () {
+       // Is cache set?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Simply check it
+               $GLOBALS[__FUNCTION__] = ((isConfigEntrySet('DEBUG_HOURLY')) && (getConfig('DEBUG_HOURLY') == 'Y'));
+       } // END - if
+
+       // Return it
+       return $GLOBALS[__FUNCTION__];
+}
+
 // Checks whether the debug reset is enabled
 function isDebugResetEnabled () {
        // Is cache set?
@@ -3301,24 +3313,24 @@ function getUsersTotalLockedReferrals ($userid, $level = NULL) {
                // Is the not level NULL?
                if (!is_null($level)) {
                        // Then add referral level
-                       $add = ' AND r.`level`=' . bigintval($level);
+                       $add = ' AND `r`.`level`=' . bigintval($level);
                } // END - if
 
                // Check for all referrals
                $result = SQL_QUERY_ESC("SELECT
-       COUNT(d.`userid`) AS `cnt`
+       COUNT(`d`.`userid`) AS `cnt`
 FROM
-       `{?_MYSQL_PREFIX?}_user_data` AS d
+       `{?_MYSQL_PREFIX?}_user_data` AS `d`
 INNER JOIN
-       `{?_MYSQL_PREFIX?}_user_refs` AS r
+       `{?_MYSQL_PREFIX?}_user_refs` AS `r`
 ON
-       d.`userid`=r.`refid`
+       `d`.`userid`=`r`.`refid`
 WHERE
-       d.`status` != 'CONFIRMED' AND
-       r.`userid`=%s
+       `d`.`status` != 'CONFIRMED' AND
+       `r`.`userid`=%s
        " . $add . "
 ORDER BY
-       d.`userid` ASC
+       `d`.`userid` ASC
 LIMIT 1",
                        array(
                                $userid
@@ -3418,7 +3430,7 @@ function padLeftZero ($str, $amount = 2) {
                return prependZeros($str, $amount);
        } else {
                // Pad it
-               return str_pad($str, $amount, '0', STR_PAD_LEFT)
+               return str_pad($str, $amount, '0', STR_PAD_LEFT);
        }
 }