mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
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
This commit is contained in:
parent
e1441b9fbe
commit
7d0d2ad869
1 changed files with 14 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue