From 70a70cc2bbf8942f89ef092e076289164bae7b4c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 29 Nov 2009 02:44:12 +0000 Subject: [PATCH] Fixes for bugs when ext-imprint is registered. Resolves #153 --- inc/classes/cachesystem.class.php | 3 +++ inc/wrapper-functions.php | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) 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 -- 2.39.5