diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-07-13 21:40:03 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-07-13 21:40:03 +0000 |
| commit | 7d0d2ad86979025fcec53dcb343863e72d4a061f (patch) | |
| tree | d212b6bf68880e88c6a1465bd402d92404c561d6 | |
| parent | e1441b9fbe515a652c1525cd1a315ad67f3477b8 (diff) | |
| download | forums-7d0d2ad86979025fcec53dcb343863e72d4a061f.tar forums-7d0d2ad86979025fcec53dcb343863e72d4a061f.tar.gz forums-7d0d2ad86979025fcec53dcb343863e72d4a061f.tar.bz2 forums-7d0d2ad86979025fcec53dcb343863e72d4a061f.tar.xz forums-7d0d2ad86979025fcec53dcb343863e72d4a061f.zip | |
Allow preview of style for user with appropriate rights ... a "cheat" really
git-svn-id: file:///svn/phpbb/trunk@4250 89ea8834-ac86-4346-8a33-228a782c2dd0
| -rw-r--r-- | phpBB/includes/session.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index cb0d7941df..06e1b72078 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -391,7 +391,7 @@ class user extends session function setup($lang_set = false, $style = false) { - global $db, $template, $config, $phpEx, $phpbb_root_path; + global $db, $template, $config, $auth, $phpEx, $phpbb_root_path; if ($this->data['user_id'] != ANONYMOUS) { @@ -461,8 +461,19 @@ class user extends session include($this->lang_path . '/' . $lang_set . '.' . $phpEx); }*/ - // Set up style - $style = ($style) ? $style : ((!$config['override_user_style'] && $this->data['user_id'] != ANONYMOUS) ? $this->data['user_style'] : $config['default_style']); + // TODO ? + // Cheat + if (!empty($_GET['style']) && $auth->acl_get('a_styles')) + { + global $SID; + $style = intval($_GET['style']); + $SID .= '&style=' . $style; + } + else + { + // Set up style + $style = ($style) ? $style : ((!$config['override_user_style'] && $this->data['user_id'] != ANONYMOUS) ? $this->data['user_style'] : $config['default_style']); + } $sql = 'SELECT DISTINCT s.style_id, t.*, c.*, i.* FROM ' . STYLES_TABLE . ' s, ' . STYLES_TPL_TABLE . ' t, ' . STYLES_CSS_TABLE . ' c, ' . STYLES_IMAGE_TABLE . " i |
