From: Roland Häder Date: Sun, 29 Nov 2009 02:44:12 +0000 (+0000) Subject: Fixes for bugs when ext-imprint is registered. Resolves #153 X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=70a70cc2bbf8942f89ef092e076289164bae7b4c Fixes for bugs when ext-imprint is registered. Resolves #153 --- diff --git a/inc/classes/cachesystem.class.php b/inc/classes/cachesystem.class.php index 571721e63d..4c23235ac2 100644 --- a/inc/classes/cachesystem.class.php +++ b/inc/classes/cachesystem.class.php @@ -176,6 +176,9 @@ class CacheSystem { } else { $GLOBALS['cache_array']['themes'][$k][$data['theme_path']] = $v; } + } elseif ($this->name == 'imprint') { + // Imprint + $GLOBALS['cache_array']['imprint'][$k][$data['imprint_id']] = $v; } else { // Finialize the cache and close it $this->finalize(); diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index c9f97c7b21..ca8ef7430b 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -675,7 +675,17 @@ function setUsername ($userName) { // Get username function getUsername () { - return $GLOBALS['username']; + // default is guest + $username = getMessage('USERNAME_GUEST'); + + // User name set? + if (isset($GLOBALS['username'])) { + // Use the set name + $username = $GLOBALS['username']; + } // END - if + + // Return it + return $username; } // Wrapper function for installation phase