]> git.mxchange.org Git - mailer.git/blobdiff - inc/wrapper-functions.php
Extension ext-funcoins continued, template helper function added:
[mailer.git] / inc / wrapper-functions.php
index 4e235f5017f328826646ee982577b6540d444d5b..0b2cf28d20f876a5ab432ad7d2017c363c61a4fa 100644 (file)
@@ -949,6 +949,7 @@ function initUserData () {
        } // END - if
 
        // Init the user
+       unset($GLOBALS['is_userdata_valid'][getCurrentUserId()]);
        $GLOBALS['user_data'][getCurrentUserId()] = array();
 }
 
@@ -1009,7 +1010,9 @@ function getUserDataArray () {
 // in, but you should use isMember() if you want to find that out.
 function isUserDataValid () {
        // User id should not be zero so abort here
-       if (!isCurrentUserIdSet()) return false;
+       if (!isCurrentUserIdSet()) {
+               return false;
+       } // END - if
 
        // Is it cached?
        if (!isset($GLOBALS['is_userdata_valid'][getCurrentUserId()])) {
@@ -1270,11 +1273,23 @@ function encodeEntities ($str) {
 }
 
 // "Getter" for date from patch_ctime
-function getDateFromPatchTime () {
+function getDateFromRepository () {
+       // Is it cached?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Then set it
+               $GLOBALS[__FUNCTION__] = generateDateTime(getConfig('CURRENT_REPOSITORY_DATE'), '5');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for date/time from patch_ctime
+function getDateTimeFromRepository () {
        // Is it cached?
        if (!isset($GLOBALS[__FUNCTION__])) {
                // Then set it
-               $GLOBALS[__FUNCTION__] = generateDateTime(getConfig('patch_ctime'), '5');
+               $GLOBALS[__FUNCTION__] = generateDateTime(getConfig('CURRENT_REPOSITORY_DATE'), '2');
        } // END - if
 
        // Return cache
@@ -2567,9 +2582,9 @@ function parseFloat ($floatString){
 }
 
 // Generates a YES/NO option list from given default
-function generateYesNoOptionList ($default = '') {
+function generateYesNoOptionList ($configEntry = '') {
        // Generate it
-       return generateOptionList('/ARRAY/', array('Y', 'N'), array('{--YES--}', '{--NO--}'), $default);
+       return generateOptionList('/ARRAY/', array('Y', 'N'), array('{--YES--}', '{--NO--}'), $configEntry);
 }
 
 // "Getter" for total available receivers