aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/session.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-07-06 17:53:57 -0400
committerNils Adermann <naderman@naderman.de>2011-07-06 17:53:57 -0400
commitb261a1a31ae8500cc090d412ed569123ae3cb9ca (patch)
tree67231ead3deadbc7d85944a83f60007098f538ae /phpBB/includes/session.php
parent8ec737e9c4d36711b09250df72492a8f89e7bfb1 (diff)
downloadforums-b261a1a31ae8500cc090d412ed569123ae3cb9ca.tar
forums-b261a1a31ae8500cc090d412ed569123ae3cb9ca.tar.gz
forums-b261a1a31ae8500cc090d412ed569123ae3cb9ca.tar.bz2
forums-b261a1a31ae8500cc090d412ed569123ae3cb9ca.tar.xz
forums-b261a1a31ae8500cc090d412ed569123ae3cb9ca.zip
[ticket/10250] The site_logo hash is different depending on imageset & language
PHPBB3-10250
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r--phpBB/includes/session.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index f509957f96..e9e706e2b8 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -2288,15 +2288,23 @@ class user extends session
{
global $cache;
- if (($img_file_hash = $cache->get('imageset_site_logo_md5')) === false)
+ $img_file_hashes = $cache->get('imageset_site_logo_md5');
+
+ if ($img_file_hashes === false)
+ {
+ $img_file_hashes = array();
+ }
+
+ $key = $this->theme['imageset_path'] . '::' . $this->img_array[$img]['image_lang'];
+ if (!isset($img_file_hashes[$key]))
{
- $img_file_hash = md5(file_get_contents($phpbb_root_path . $path));
- $cache->put('imageset_site_logo_md5', $img_file_hash);
+ $img_file_hashes[$key] = md5(file_get_contents($phpbb_root_path . $path));
+ $cache->put('imageset_site_logo_md5', $img_file_hashes);
}
$phpbb_logo_hash = '0c461a32cd3621643105f0d02a772c10';
- if ($phpbb_logo_hash == $img_file_hash)
+ if ($phpbb_logo_hash == $img_file_hashes[$key])
{
$img_data['width'] = '149';
$img_data['height'] = '52';