|
From: Paul S. O. <ps...@us...> - 2002-06-08 23:55:04
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv30862/includes
Modified Files:
auth_session.php
Log Message:
Spot the deliberate errors
Index: auth_session.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/auth_session.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** auth_session.php 8 Jun 2002 19:50:18 -0000 1.1
--- auth_session.php 8 Jun 2002 23:55:00 -0000 1.2
***************
*** 143,146 ****
--- 143,148 ----
}
+ $this->config();
+
return $this->userdata;
}
***************
*** 354,359 ****
function config()
{
! global $board_config, $theme, $images, $user_ip;
! global $template, $lang, $phpEx, $phpbb_root_path;
if ( $this->userdata['user_id'] != ANONYMOUS )
--- 356,361 ----
function config()
{
! global $db, $template, $lang, $board_config, $theme, $images;
! global $phpEx, $phpbb_root_path;
if ( $this->userdata['user_id'] != ANONYMOUS )
***************
*** 395,410 ****
// Set up style
//
! if ( !$board_config['override_user_style'] )
{
! if ( $this->userdata['user_id'] != ANONYMOUS && $this->userdata['user_style'] > 0 )
{
! if ( $theme = setup_style($this->userdata['user_style']) )
{
! return;
}
}
}
-
- $theme = setup_style($board_config['default_style']);
return;
--- 397,440 ----
// Set up style
//
! $style = ( !$board_config['override_user_style'] && $this->userdata['user_id'] != ANONYMOUS && $this->userdata['user_style'] > 0 )? $this->userdata['user_style'] : $board_config['default_style'];
!
! $sql = "SELECT *
! FROM " . THEMES_TABLE . "
! WHERE themes_id = $style";
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(CRITICAL_ERROR, 'Could not query database for theme info');
! }
!
! if ( !($theme = $db->sql_fetchrow($result)) )
! {
! message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]");
! }
!
! $template_path = 'templates/' ;
! $template_name = $theme['template_name'] ;
!
! $template = new Template($phpbb_root_path . $template_path . $template_name);
!
! if ( $template )
! {
! $current_template_path = $template_path . $template_name;
! @include($phpbb_root_path . $template_path . $template_name . '/' . $template_name . '.cfg');
!
! if ( !defined('TEMPLATE_CONFIG') )
! {
! message_die(CRITICAL_ERROR, "Could not open $template_name template config file", '', __LINE__, __FILE__);
! }
!
! $img_lang = ( file_exists($current_template_path . '/images/lang_' . $board_config['default_lang']) ) ? $board_config['default_lang'] : 'english';
!
! while( list($key, $value) = @each($images) )
{
! if ( !is_array($value) )
{
! $images[$key] = str_replace('{LANG}', 'lang_' . $img_lang, $value);
}
}
}
return;
|