- bug 168 fixed: crash when language file does not exists. Constant
PHPWG_DEFAULT_LANGUAGE added. New function get_language_filepath always used to find language files. git-svn-id: http://piwigo.org/svn/trunk@879 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
b7b05eafc3
commit
0c0ab6d700
6 changed files with 55 additions and 51 deletions
|
|
@ -27,19 +27,11 @@
|
|||
|
||||
include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php' );
|
||||
|
||||
// language files
|
||||
$user_langdir = PHPWG_ROOT_PATH.'language/'.$user['language'];
|
||||
$conf_langdir = PHPWG_ROOT_PATH.'language/'.$conf['default_language'];
|
||||
|
||||
if (file_exists($user_langdir.'/help.html'))
|
||||
{
|
||||
$html_file = $user_langdir.'/help.html';
|
||||
}
|
||||
else
|
||||
{
|
||||
$html_file = $conf_langdir.'/help.html';
|
||||
}
|
||||
|
||||
$template->set_filenames(array('help_content' => $html_file));
|
||||
$template->set_filenames(
|
||||
array(
|
||||
'help_content' => get_language_filepath('help.html')
|
||||
)
|
||||
);
|
||||
|
||||
$template->assign_var_from_handle('ADMIN_CONTENT', 'help_content');
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue