From 3d5a770c94a9971510976ba3b0f39f8e444ea51e Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Thu, 8 Jan 2004 12:49:05 +0000 Subject: 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 --- phpBB/includes/session.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'phpBB/includes/session.php') 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_lang, $this->theme['primary'][$img]) . ' ' . $width . 'alt="' . $alt . '" title="' . $alt . '" name="' . $img . '"/>'; + $imgs[$img] = '' . $alt . ''; } + return $imgs[$img]; } -- cgit v1.2.1