|
From: FlorinCB <ory...@us...> - 2008-10-05 01:17:28
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb3 In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv8245/sessions/phpbb3 Modified Files: session.php Log Message: fixed Index: session.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/session.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** session.php 4 Oct 2008 07:04:25 -0000 1.32 --- session.php 5 Oct 2008 01:16:26 -0000 1.33 *************** *** 1353,1366 **** { $style = $this->style; ! // Set up style $style = ($style) ? $style : ((!$board_config['override_user_style'] && $this->data['user_id'] != ANONYMOUS) ? $this->data['user_style'] : $this->phpbb_style['style_id']); } ! $sql = 'SELECT s.style_id, t.template_storedb, t.template_path, t.template_id, t.bbcode_bitfield, c.theme_path, c.theme_name, c.theme_storedb, c.theme_id, i.imageset_path, i.imageset_id, i.imageset_name ! FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . ' c, ' . STYLES_IMAGESET_TABLE . " i ! WHERE s.style_id = $style AND t.template_id = s.template_id AND c.theme_id = s.theme_id ! AND i.imageset_id = s.imageset_id"; if ( !($result = $db->sql_query($sql, 3600)) ) --- 1353,1395 ---- { $style = $this->style; ! ! if(!$board_config['override_user_style'] && ($this->data['user_id'] != ANONYMOUS)) ! { ! // Set up style ! $style = $this->data['user_style'] ? $this->data['user_style'] : $board_config['default_style']; ! } ! else ! { ! $default_style = $portal_config['default_style']; ! //If user have other style in mxp then the one from phpBB not to have forum page and modules graphics will be messaed up ! //Anonymouse users should see all block graphic corect ! //Query phpBB style_id corepondent to mxp themes_id ! $sql = "SELECT s.style_id ! FROM " . MX_THEMES_TABLE . " AS m, " . STYLES_TABLE . " AS s, " . STYLES_TEMPLATE_TABLE . " AS t ! WHERE m.themes_id = " . (int) $default_style . " ! AND t.template_path = m.template_name ! AND t.template_id = s.template_id"; ! if ( !($row = $db->sql_fetchrow($db->sql_query($sql))) ) ! { ! mx_message_die(CRITICAL_ERROR, "Could not query database for phpBB style_id info for mxp themes_id: $default_style", "", __LINE__, __FILE__, $sql); ! } ! else ! { ! $style = $row['style_id']; //User style ! ! } ! } ! ! // Set up style Temp code should be removed after bugtraking $style = ($style) ? $style : ((!$board_config['override_user_style'] && $this->data['user_id'] != ANONYMOUS) ? $this->data['user_style'] : $this->phpbb_style['style_id']); + } ! $sql = "SELECT s.style_id, t.template_storedb, t.template_path, t.template_id, t.bbcode_bitfield, c.theme_path, c.theme_name, c.theme_storedb, c.theme_id, i.imageset_path, i.imageset_id, i.imageset_name ! FROM " . STYLES_TABLE . " AS s, " . STYLES_TEMPLATE_TABLE . " AS t, " . STYLES_THEME_TABLE . " AS c, " . STYLES_IMAGESET_TABLE . " i ! WHERE s.style_id = " . (int) $style . " AND t.template_id = s.template_id AND c.theme_id = s.theme_id ! AND i.imageset_id = s.imageset_id"; if ( !($result = $db->sql_query($sql, 3600)) ) |