|
From: Paul S. O. <ps...@us...> - 2002-02-04 18:42:50
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv30564/includes
Modified Files:
functions.php
Log Message:
Another change to the way {LANG} is handled for images ... last one, ... hopefully :)
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions.php,v
retrieving revision 1.110
retrieving revision 1.111
diff -C2 -r1.110 -r1.111
*** functions.php 2002/02/03 19:19:42 1.110
--- functions.php 2002/02/04 18:31:22 1.111
***************
*** 243,266 ****
global $template, $lang, $phpEx, $phpbb_root_path;
- if( !$board_config['override_user_style'] )
- {
- if( $userdata['user_id'] != ANONYMOUS && isset($userdata['user_style']) )
- {
- $theme = setup_style($userdata['user_style']);
- if( !$theme )
- {
- $theme = setup_style($board_config['default_style']);
- }
- }
- else
- {
- $theme = setup_style($board_config['default_style']);
- }
- }
- else
- {
- $theme = setup_style($board_config['default_style']);
- }
-
if( $userdata['user_id'] != ANONYMOUS )
{
--- 243,246 ----
***************
*** 298,309 ****
}
! while( list($key, $value) = @each($images) )
{
! if( strstr($value, "{LANG}") )
{
! $new_value = str_replace("{LANG}", $board_config['default_lang'], $value);
!
! $images[$key] = ( file_exists($new_value) ) ? $new_value : str_replace("{LANG}", "english", $value);
}
}
--- 278,302 ----
}
! //
! // Set up style
! //
! if( !$board_config['override_user_style'] )
{
! if( $userdata['user_id'] != ANONYMOUS && isset($userdata['user_style']) )
{
! $theme = setup_style($userdata['user_style']);
! if( !$theme )
! {
! $theme = setup_style($board_config['default_style']);
! }
}
+ else
+ {
+ $theme = setup_style($board_config['default_style']);
+ }
+ }
+ else
+ {
+ $theme = setup_style($board_config['default_style']);
}
***************
*** 318,327 ****
FROM " . THEMES_TABLE . "
WHERE themes_id = $style";
! if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Couldn't query database for theme info.");
}
! if( !$row = $db->sql_fetchrow($result) )
{
message_die(CRITICAL_ERROR, "Couldn't get theme data for themes_id=$style.");
--- 311,320 ----
FROM " . THEMES_TABLE . "
WHERE themes_id = $style";
! if( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, "Couldn't query database for theme info.");
}
! if( !($row = $db->sql_fetchrow($result)) )
{
message_die(CRITICAL_ERROR, "Couldn't get theme data for themes_id=$style.");
***************
*** 343,349 ****
}
}
! return($row);
}
--- 336,349 ----
}
+ if( file_exists($current_template_path . '/images/lang_' . $board_config['default_lang']) )
+ {
+ while( list($key, $value) = @each($images) )
+ {
+ $images[$key] = str_replace("{LANG}", 'lang_' . $board_config['default_lang'], $value);
+ }
+ }
}
! return $row;
}
|