mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Error reporting on set_style()
git-svn-id: file:///svn/phpbb/trunk@1099 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
c27bd18798
commit
235c8b18cc
1 changed files with 8 additions and 8 deletions
|
@ -292,28 +292,28 @@ function setup_style($style)
|
||||||
WHERE themes_id = $style";
|
WHERE themes_id = $style";
|
||||||
if(!$result = $db->sql_query($sql))
|
if(!$result = $db->sql_query($sql))
|
||||||
{
|
{
|
||||||
return(FALSE);
|
message_die(CRITICAL_ERROR, "Couldn't query database for theme info.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !$row = $db->sql_fetchrow($result) )
|
if( !$row = $db->sql_fetchrow($result) )
|
||||||
{
|
{
|
||||||
return(FALSE);
|
message_die(CRITICAL_ERROR, "Couldn't get theme data for themes_id=$style.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// $template_path = ( defined("IN_ADMIN") ) ? "admin/templates/" : "templates/" ;
|
// $template_path = ( defined('IN_ADMIN') ) ? 'admin/templates/' : 'templates/' ;
|
||||||
// $template_name = ( defined("IN_ADMIN") ) ? $board_config['board_admin_template'] : $myrow['template_name'] ;
|
// $template_name = ( defined('IN_ADMIN') ) ? $board_config['board_admin_template'] : $myrow['template_name'] ;
|
||||||
$template_path = "templates/" ;
|
$template_path = 'templates/' ;
|
||||||
$template_name = $row['template_name'] ;
|
$template_name = $row['template_name'] ;
|
||||||
|
|
||||||
$template = new Template($phpbb_root_path . $template_path . $template_name);
|
$template = new Template($phpbb_root_path . $template_path . $template_name);
|
||||||
|
|
||||||
if( $template )
|
if( $template )
|
||||||
{
|
{
|
||||||
@include($phpbb_root_path . $template_path . $template_name . "/" . $template_name . ".cfg");
|
@include($phpbb_root_path . $template_path . $template_name . '/' . $template_name . '.cfg');
|
||||||
|
|
||||||
if( !defined("TEMPLATE_CONFIG") )
|
if( !defined("TEMPLATE_CONFIG") )
|
||||||
{
|
{
|
||||||
message_die(CRITICAL_ERROR, "Couldn't open " . $template_name . " template config file");
|
message_die(CRITICAL_ERROR, "Couldn't open $template_name template config file");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1082,4 +1082,4 @@ function message_die($msg_code, $msg_text = "", $msg_title = "", $err_line = "",
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Reference in a new issue