diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2004-01-08 12:49:05 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2004-01-08 12:49:05 +0000 |
| commit | 3d5a770c94a9971510976ba3b0f39f8e444ea51e (patch) | |
| tree | 61c976620a84ce3d6ecc1c6546ab99fcd96f7aaf /phpBB/includes/session.php | |
| parent | 21120e846e0706e78cc35041e12a0e52f179dd41 (diff) | |
| download | forums-3d5a770c94a9971510976ba3b0f39f8e444ea51e.tar forums-3d5a770c94a9971510976ba3b0f39f8e444ea51e.tar.gz forums-3d5a770c94a9971510976ba3b0f39f8e444ea51e.tar.bz2 forums-3d5a770c94a9971510976ba3b0f39f8e444ea51e.tar.xz forums-3d5a770c94a9971510976ba3b0f39f8e444ea51e.zip | |
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
Diffstat (limited to 'phpBB/includes/session.php')
| -rw-r--r-- | phpBB/includes/session.php | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index ac65604f35..725957a0c1 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -576,7 +576,7 @@ class user extends session $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; } @@ -602,12 +602,23 @@ class user extends session if (empty($imgs[$img]) || $no_cache) { - $alt = (!empty($this->lang[$alt])) ? $this->lang[$alt] : ''; + if (!$width) + { + list($imgsrc, $height, $width) = explode('*', $this->theme['primary'][$img]); + } + else + { + list($imgsrc, $height) = explode('*', $this->theme['primary'][$img]); + } - $width = ($width) ? 'width="' . $width . '" ' : ''; + $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=' . str_replace('{LANG}', $this->img_lang, $this->theme['primary'][$img]) . ' ' . $width . 'alt="' . $alt . '" title="' . $alt . '" name="' . $img . '"/>'; + $imgs[$img] = '<img src=' . $imgsrc . $width . $height . ' alt="' . $alt . '" title="' . $alt . '" name="' . $img . '"/>'; } + return $imgs[$img]; } |
