X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fwrapper-functions.php;h=fda7b2a4c04a5ad6364d213f09f6be2162d49f63;hb=4fef71140a7d5faeaff256ab7c5bf4616c671f63;hp=354fe7cbe4743335007219fd6788d750b23f2518;hpb=771a678b35cf29540fccf550adc5d3b63feefc7e;p=mailer.git diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 354fe7cbe4..fda7b2a4c0 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -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?