Avatar

more_smilies_label - is not used (Bugs)

by Micha ⌂, Sunday, June 16, 2013, 09:33 (3939 days ago) @ Auge

Hi Auge,

[edit]The point is: if the language file is defined once in the index.php with the variable $language_file, this variable should be used directly in the "other" file instead redefining the content of the variable.[/edit]

That's the point, yes. I'm not familiar with smarty. :-( I take a look to index.php:

if(isset($_SESSION[$settings['session_prefix'].'usersettings']['language']) && file_exists(LANG_DIR.'/'.$_SESSION[$settings['session_prefix'].'usersettings']['language']))
 {
  $language_file = $_SESSION[$settings['session_prefix'].'usersettings']['language'];
 }
else
 {
  $language_file = $settings['language_file'];
 }
$smarty->assign('language_file', $language_file);
$smarty->configLoad($language_file, 'default');


Here, the configLoad-function is called with 'default' as 2th parameter but at the JS-file $smarty->configLoad($language_file, 'general'); is used. What is the different between default and general?

Anyway, you are right: if $language_file is defined at the index.php, it doesn't make sense to redefine it. Thus, I try now the following code:

$smarty->configLoad( (isset($language_file)?$language_file:$settings['language_file']) , 'general');

regards
Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences


Complete thread:

 RSS Feed of thread