]> git.mxchange.org Git - mailer.git/blobdiff - inc/wrapper-functions.php
Mailer project continued:
[mailer.git] / inc / wrapper-functions.php
index 354fe7cbe4743335007219fd6788d750b23f2518..fda7b2a4c04a5ad6364d213f09f6be2162d49f63 100644 (file)
@@ -997,9 +997,7 @@ function setCurrentUserId ($userid) {
        // Is the cache from below functions different?
        if (((isset($GLOBALS['getCurrentUserId'])) && ($GLOBALS['getCurrentUserId'] != $userid)) || ((!isset($GLOBALS['current_userid'])) && (isset($GLOBALS['isCurrentUserIdSet'])))) {
                // Then unset both
-               unset($GLOBALS['getCurrentUserId']);
-               unset($GLOBALS['isCurrentUserIdSet']);
-               unset($GLOBALS['isValidUserId'][$userid]);
+               unsetCurrentUserId();
        } // END - if
 
        // Set userid
@@ -1042,6 +1040,20 @@ function isCurrentUserIdSet () {
        return $GLOBALS[__FUNCTION__];
 }
 
+// Unsets current userid
+function unsetCurrentUserId () {
+       // Do we have it set?
+       if (isset($GLOBALS['current_userid'])) {
+               // Unset this, too
+               unset($GLOBALS['isValidUserId'][$GLOBALS['current_userid']]);
+       } // END - if
+
+       // Unset all cache entries
+       unset($GLOBALS['current_userid']);
+       unset($GLOBALS['getCurrentUserId']);
+       unset($GLOBALS['isCurrentUserIdSet']);
+}
+
 // Checks whether we are debugging template cache
 function isDebuggingTemplateCache () {
        // Do we have cache?
@@ -1823,6 +1835,18 @@ function getMtWord2 () {
        return $GLOBALS[__FUNCTION__];
 }
 
+// "Getter" for mt_word2
+function getMtWord3 () {
+       // Do we have cache?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__] = getConfig('mt_word3');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
 // "Getter" for main_title
 function getMainTitle () {
        // Do we have cache?