Fixes for bugs when ext-imprint is registered. Resolves #153
authorRoland Häder <roland@mxchange.org>
Sun, 29 Nov 2009 02:44:12 +0000 (02:44 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 29 Nov 2009 02:44:12 +0000 (02:44 +0000)
inc/classes/cachesystem.class.php
inc/wrapper-functions.php

index 571721e..4c23235 100644 (file)
@@ -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();
index c9f97c7..ca8ef74 100644 (file)
@@ -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