]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/refback_functions.php
Some improvements:
[mailer.git] / inc / libs / refback_functions.php
index d993ebaf94216f9916a7faef7ea2a414c3c6fd95..8cb68e69269590f6d4b5e6f0888fc43f62004a5f 100644 (file)
@@ -354,19 +354,59 @@ function updateMemberRefbackPercents ($id, $percents, $note) {
        sendAdminNotification('{--ADMIN_REFBACK_SUBJECT--}', 'admin_refback', $content, $content['refid']);
 
        // All fine!
-       $status['ok'] = true;
+       $status['ok'] = TRUE;
 
        // Return status array
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'id=' . $id . ',percents=' . $percents . ' - EXIT!');
        return $status;
 }
 
+// ----------------------------------------------------------------------------
+//                 Wrapper functions for configuration entries
+// ----------------------------------------------------------------------------
+
+// Getter for refback_enabled
+function getRefbackEnabled () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('refback_enabled');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
 // Checks whether refback is enabled
 function isRefbackEnabled () {
        // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__])) {
                // Determine it
-               $GLOBALS[__FUNCTION__] = (getConfig('refback_enabled') == 'Y');
+               $GLOBALS[__FUNCTION__] = (getRefbackEnabled() == 'Y');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
+// Getter for refback_max_perc
+function getRefbackMaxPerc () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('refback_max_perc');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
+// Getter for refback_min_perc
+function getRefbackMinPerc () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('refback_min_perc');
        } // END - if
 
        // Return cache