mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Alter method for storing imageset data ... I can't see any obvious increase in page gen times but please comment if such a thing does become apparent
git-svn-id: file:///svn/phpbb/trunk@4729 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
21120e846e
commit
3d5a770c94
2 changed files with 16 additions and 5 deletions
|
@ -576,7 +576,7 @@ class user extends session
|
||||||
|
|
||||||
$template->set_template();
|
$template->set_template();
|
||||||
|
|
||||||
$this->img_lang = (file_exists($phpbb_root_path . 'styles/' . $this->theme['default']['imageset_path'] . '/imageset/' . $this->lang_name)) ? $this->lang_name : $config['default_lang'];
|
$this->img_lang = (file_exists($phpbb_root_path . 'styles/' . $this->theme['primary']['imageset_path'] . '/imageset/' . $this->lang_name)) ? $this->lang_name : $config['default_lang'];
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -602,12 +602,23 @@ class user extends session
|
||||||
|
|
||||||
if (empty($imgs[$img]) || $no_cache)
|
if (empty($imgs[$img]) || $no_cache)
|
||||||
{
|
{
|
||||||
$alt = (!empty($this->lang[$alt])) ? $this->lang[$alt] : '';
|
if (!$width)
|
||||||
|
{
|
||||||
$width = ($width) ? 'width="' . $width . '" ' : '';
|
list($imgsrc, $height, $width) = explode('*', $this->theme['primary'][$img]);
|
||||||
|
|
||||||
$imgs[$img] = '<img src=' . str_replace('{LANG}', $this->img_lang, $this->theme['primary'][$img]) . ' ' . $width . 'alt="' . $alt . '" title="' . $alt . '" name="' . $img . '"/>';
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
list($imgsrc, $height) = explode('*', $this->theme['primary'][$img]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$imgsrc = '"' . $phpbb_root_path . 'styles/' . $this->theme['primary']['imageset_path'] . '/imageset/' . str_replace('{LANG}', $this->img_lang, $imgsrc) . '"';
|
||||||
|
$width = ($width) ? ' width="' . $width . '"' : '';
|
||||||
|
$height = ($height) ? ' height="' . $height . '"' : '';
|
||||||
|
$alt = (!empty($this->lang[$alt])) ? $this->lang[$alt] : $alt;
|
||||||
|
|
||||||
|
$imgs[$img] = '<img src=' . $imgsrc . $width . $height . ' alt="' . $alt . '" title="' . $alt . '" name="' . $img . '"/>';
|
||||||
|
}
|
||||||
|
|
||||||
return $imgs[$img];
|
return $imgs[$img];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue