diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2006-05-21 16:54:19 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-05-21 16:54:19 +0000 |
| commit | 530b7e94c5e10eb1b9aa2ea488825265b685651e (patch) | |
| tree | e679fd1af844e3b80d36923bde481873aee0e56d /phpBB/includes/session.php | |
| parent | 2ddac1037550a12e6a49dd7d78f7884ce584eedc (diff) | |
| download | forums-530b7e94c5e10eb1b9aa2ea488825265b685651e.tar forums-530b7e94c5e10eb1b9aa2ea488825265b685651e.tar.gz forums-530b7e94c5e10eb1b9aa2ea488825265b685651e.tar.bz2 forums-530b7e94c5e10eb1b9aa2ea488825265b685651e.tar.xz forums-530b7e94c5e10eb1b9aa2ea488825265b685651e.zip | |
- fixing a few smaller bugs/glitches
- init user session in cron.php (else it can produce errors if functions expect the user object being set)
- fix sql escaping for mssql/mssql_odbc
git-svn-id: file:///svn/phpbb/trunk@5957 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/session.php')
| -rw-r--r-- | phpBB/includes/session.php | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 306a7e36e1..21a3e7f882 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -1237,13 +1237,22 @@ class user extends session return $imgs[$img . $suffix]; } - if ($width === false) + // Do not include dimensions? + if (strpos($this->theme[$img], '*') === false) { - list($imgsrc, $height, $width) = explode('*', $this->theme[$img]); + $imgsrc = trim($this->theme[$img]); + $width = $height = false; } else { - list($imgsrc, $height) = explode('*', $this->theme[$img]); + if ($width === false) + { + list($imgsrc, $height, $width) = explode('*', $this->theme[$img]); + } + else + { + list($imgsrc, $height) = explode('*', $this->theme[$img]); + } } if ($suffix !== '') @@ -1262,19 +1271,19 @@ class user extends session { case 'src': return $imgs[$img . $suffix]['src']; - break; + break; case 'width': return $imgs[$img . $suffix]['width']; - break; + break; case 'height': return $imgs[$img . $suffix]['height']; - break; + 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 . '" />'; - break; + break; } } |
