X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fwrapper-functions.php;h=ad438537284caee8426dee8900fe0f69baef1b08;hb=5ab0d021f3e96722af5d96d2b9036430200c06cb;hp=25e188c4821130a314824b6fb4401dba595962b2;hpb=b94278362b33bb51ddf525358f5dfba6688d01b9;p=mailer.git diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 25e188c482..ad43853728 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? @@ -2804,18 +2816,6 @@ function getUserUsedPoints ($userid) { return $GLOBALS[__FUNCTION__][$userid]; } -// Wrapper to check if url_blacklist is enabled -function isUrlBlacklistEnabled () { - // Is there cache? - if (!isset($GLOBALS[__FUNCTION__])) { - // Determine it - $GLOBALS[__FUNCTION__] = (getConfig('url_blacklist') == 'Y'); - } // END - if - - // Return cache - return $GLOBALS[__FUNCTION__]; -} - // Checks whether direct payment is allowed in configuration function isDirectPaymentEnabled () { // Is there cache? @@ -3301,24 +3301,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