mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/10250] The site_logo hash is different depending on imageset & language
PHPBB3-10250
This commit is contained in:
parent
8ec737e9c4
commit
b261a1a31a
1 changed files with 12 additions and 4 deletions
|
@ -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_hash = md5(file_get_contents($phpbb_root_path . $path));
|
||||
$cache->put('imageset_site_logo_md5', $img_file_hash);
|
||||
$img_file_hashes = array();
|
||||
}
|
||||
|
||||
$key = $this->theme['imageset_path'] . '::' . $this->img_array[$img]['image_lang'];
|
||||
if (!isset($img_file_hashes[$key]))
|
||||
{
|
||||
$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';
|
||||
|
|
Loading…
Add table
Reference in a new issue