From: Roland Häder Date: Thu, 24 Jan 2013 22:06:39 +0000 (+0000) Subject: Added more configuration wrappers X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fc741216b12245da56b5de93d1f967586b0848d7;p=mailer.git Added more configuration wrappers --- diff --git a/inc/libs/blacklist_functions.php b/inc/libs/blacklist_functions.php index 23594f1bbc..ab92566791 100644 --- a/inc/libs/blacklist_functions.php +++ b/inc/libs/blacklist_functions.php @@ -174,12 +174,36 @@ function isGenericBlacklistEnabled ($type) { return $GLOBALS[__FUNCTION__]; } +// Getter for url_blacklist +function getUrlBlacklist () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('url_blacklist'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // 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'); + $GLOBALS[__FUNCTION__] = (getUrlBlacklist() == 'Y'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for email_blacklist +function getEmailBlacklist () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('email_blacklist'); } // END - if // Return cache @@ -191,7 +215,19 @@ function isEmailBlacklistEnabled () { // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it - $GLOBALS[__FUNCTION__] = (getConfig('email_blacklist') == 'Y'); + $GLOBALS[__FUNCTION__] = (getEmailBlacklist() == 'Y'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for ip_blacklist +function getIpBlacklist () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('ip_blacklist'); } // END - if // Return cache @@ -203,7 +239,7 @@ function isIpBlacklistEnabled () { // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it - $GLOBALS[__FUNCTION__] = (getConfig('ip_blacklist') == 'Y'); + $GLOBALS[__FUNCTION__] = (getIpBlacklist() == 'Y'); } // END - if // Return cache