]> git.mxchange.org Git - mailer.git/commitdiff
Also 'min_age' is now wrapped
authorRoland Häder <roland@mxchange.org>
Wed, 23 Jan 2013 14:33:16 +0000 (14:33 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 23 Jan 2013 14:33:16 +0000 (14:33 +0000)
inc/libs/other_functions.php
inc/template-functions.php

index a2b9fffed7d573072267cbbcc82842818dafe54c..d8542186cb38e704d0a6439c1b9468f9277e8e1b 100644 (file)
@@ -160,5 +160,17 @@ function getDisplayDebugSqls () {
        return $GLOBALS[__FUNCTION__];
 }
 
+// "Getter" for min_age
+function getMinAge () {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('min_age');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
 // [EOF]
 ?>
index 9e9a252d1840d44918ce901742311291dc057a3e..9c9059d31494a22c23bc8a0004515d484b547917 100644 (file)
@@ -787,7 +787,7 @@ function addSelectionBox ($type, $default, $prefix = '', $id = NULL, $class = 'f
                        // Use configured min age or fixed?
                        if (isExtensionInstalledAndNewer('other', '0.2.1')) {
                                // Configured
-                               $startYear = $year - getConfig('min_age');
+                               $startYear = $year - getMinAge();
                        } else {
                                // Fixed 16 years
                                $startYear = $year - 16;