X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fwrapper-functions.php;h=35af66dc4477c33836cfe9c47105bf21ee5b8b7e;hb=77669502ccc2779d32a842f6d523fb68169fadda;hp=1593901d6a293938a3a367b21c3906357b164cd4;hpb=be0b83c7b9a7a8cf91ef6799bede2d49cfa5a131;p=mailer.git diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 1593901d6a..35af66dc44 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -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); } }