aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/session.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2006-08-28 17:20:21 +0000
committerNils Adermann <naderman@naderman.de>2006-08-28 17:20:21 +0000
commitc0a880b6652d330b760b7da7cdde8076f854d836 (patch)
treee83ab0835afa5660ff8f582535a25c2a1c1f0f69 /phpBB/includes/session.php
parent1d37b69ddd79d9d6bc1346f3761a899d20305636 (diff)
downloadforums-c0a880b6652d330b760b7da7cdde8076f854d836.tar
forums-c0a880b6652d330b760b7da7cdde8076f854d836.tar.gz
forums-c0a880b6652d330b760b7da7cdde8076f854d836.tar.bz2
forums-c0a880b6652d330b760b7da7cdde8076f854d836.tar.xz
forums-c0a880b6652d330b760b7da7cdde8076f854d836.zip
- birthdays/age in user's timezone and not server's local time
- parse bbcode in posts with fewer characters than selected maximum on search results page - retrieve search word context in posts which are longer than maximum characters (no raw BBCode anymore) - formatted text is processed in the same order everywhere now: censor_text, replace newlines, bbcode, smileys, attachments, highlighting [including Bug #2048] - highlighting pattern updated to exclude style and script (e.g custom BBCode) [Bug #3856] - fixed a style problem in Opera [Bug #3770] - performance increase for user::img() - slight adjustments to search git-svn-id: file:///svn/phpbb/trunk@6321 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r--phpBB/includes/session.php22
1 files changed, 12 insertions, 10 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 0e934edb8a..5441f7e556 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -1340,13 +1340,15 @@ class user extends session
static $imgs;
global $phpbb_root_path;
- if (empty($imgs[$img . $suffix]) || $width !== false)
+ $img_data = $imgs[$img . $suffix];
+
+ if (empty($img_data) || $width !== false)
{
if (!isset($this->theme[$img]) || !$this->theme[$img])
{
// Do not fill the image to let designers decide what to do if the image is empty
- $imgs[$img . $suffix] = '';
- return $imgs[$img . $suffix];
+ $img_data = '';
+ return $img_data;
}
// Do not include dimensions?
@@ -1372,9 +1374,9 @@ class user extends session
$imgsrc = str_replace('{SUFFIX}', $suffix, $imgsrc);
}
- $imgs[$img . $suffix]['src'] = $phpbb_root_path . 'styles/' . $this->theme['imageset_path'] . '/imageset/' . str_replace('{LANG}', $this->img_lang, $imgsrc);
- $imgs[$img . $suffix]['width'] = $width;
- $imgs[$img . $suffix]['height'] = $height;
+ $img_data['src'] = $phpbb_root_path . 'styles/' . $this->theme['imageset_path'] . '/imageset/' . str_replace('{LANG}', $this->img_lang, $imgsrc);
+ $img_data['width'] = $width;
+ $img_data['height'] = $height;
}
$alt = (!empty($this->lang[$alt])) ? $this->lang[$alt] : $alt;
@@ -1382,19 +1384,19 @@ class user extends session
switch ($type)
{
case 'src':
- return $imgs[$img . $suffix]['src'];
+ return $img_data['src'];
break;
case 'width':
- return $imgs[$img . $suffix]['width'];
+ return $img_data['width'];
break;
case 'height':
- return $imgs[$img . $suffix]['height'];
+ return $img_data['height'];
break;
default:
- return '<img src="' . $imgs[$img . $suffix]['src'] . '"' . (($imgs[$img . $suffix]['width']) ? ' width="' . $imgs[$img . $suffix]['width'] . '"' : '') . (($imgs[$img . $suffix]['height']) ? ' height="' . $imgs[$img . $suffix]['height'] . '"' : '') . ' alt="' . $alt . '" title="' . $alt . '" />';
+ return '<img src="' . $img_data['src'] . '"' . (($img_data['width']) ? ' width="' . $img_data['width'] . '"' : '') . (($img_data['height']) ? ' height="' . $img_data['height'] . '"' : '') . ' alt="' . $alt . '" title="' . $alt . '" />';
break;
}
}