aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_content.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2010-03-02 01:05:39 +0100
committerNils Adermann <naderman@naderman.de>2010-03-02 01:05:39 +0100
commit1f3498c0d6a20a08fe17948b32fc435f85a6eff8 (patch)
treee665177edec38473d116620bba9959a448795f49 /phpBB/includes/functions_content.php
parenta0b58772175ce7490872356c5050d08bd15b488b (diff)
parentd78df35da9c41883ae988008952a9d360c591883 (diff)
downloadforums-1f3498c0d6a20a08fe17948b32fc435f85a6eff8.tar
forums-1f3498c0d6a20a08fe17948b32fc435f85a6eff8.tar.gz
forums-1f3498c0d6a20a08fe17948b32fc435f85a6eff8.tar.bz2
forums-1f3498c0d6a20a08fe17948b32fc435f85a6eff8.tar.xz
forums-1f3498c0d6a20a08fe17948b32fc435f85a6eff8.zip
Merge commit 'release-3.0.4'
Diffstat (limited to 'phpBB/includes/functions_content.php')
-rw-r--r--phpBB/includes/functions_content.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index 1228f8e567..f5c0786fed 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -1144,7 +1144,7 @@ function truncate_string($string, $max_length = 60, $max_store_length = 255, $al
/**
* Get username details for placing into templates.
-* This function caches all modes on first call, except for no_profile - determined by $user_id/$guest_username combination.
+* This function caches all modes on first call, except for no_profile and anonymous user - determined by $user_id.
*
* @param string $mode Can be profile (for getting an url to the profile), username (for obtaining the username), colour (for obtaining the user colour), full (for obtaining a html string representing a coloured link to the users profile) or no_profile (the same as full but forcing no profile link)
* @param int $user_id The users id
@@ -1161,10 +1161,10 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
static $_profile_cache;
static $_base_profile_url;
- $cache_key = $user_id . (string) $guest_username;
+ $cache_key = $user_id;
// If the get_username_string() function had been executed once with an (to us) unkown mode, all modes are pre-filled and we can just grab it.
- if (isset($_profile_cache[$cache_key][$mode]))
+ if ($user_id && $user_id != ANONYMOUS && isset($_profile_cache[$cache_key][$mode]))
{
// If the mode is 'no_profile', we simply construct the TPL code due to calls to this mode being very very rare
if ($mode == 'no_profile')