]> git.mxchange.org Git - mailer.git/commitdiff
Added more configuration wrappers
authorRoland Häder <roland@mxchange.org>
Thu, 24 Jan 2013 22:06:39 +0000 (22:06 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 24 Jan 2013 22:06:39 +0000 (22:06 +0000)
inc/libs/blacklist_functions.php

index 23594f1bbc3ee017034692807eda8102309b034c..ab92566791f08f1cdec04675c557cb91a804b247 100644 (file)
@@ -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