From: <sy...@us...> - 2004-06-03 15:45:55
|
Update of /cvsroot/tikiwiki/tiki In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31016 Modified Files: tiki-setup.php Log Message: fix anonymous switch-lang when register_globals is on Index: tiki-setup.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/tiki-setup.php,v retrieving revision 1.229 retrieving revision 1.230 diff -u -d -r1.229 -r1.230 --- tiki-setup.php 31 May 2004 22:55:58 -0000 1.229 +++ tiki-setup.php 3 Jun 2004 15:45:44 -0000 1.230 @@ -492,6 +492,8 @@ $smarty->assign('wiki_cache', $wiki_cache); $feature_file_galleries = 'n'; $feature_file_galleries_rankings = 'n'; +if (isset($_SESSION["language"])) + $saveLanguage = $_SESSION["language"]; // if register_globals is on variable and _SESSION are the same $language = 'en'; $lang_use_db = 'n'; @@ -1291,8 +1293,8 @@ } $smarty->assign('language', $language); } -if ((!isset($user) || $user == "") && isset($_SESSION['language']) ) { // users not logged that change the preference - $language = $_SESSION['language']; +if (!(isset($user) && $user) && isset($saveLanguage) ) { // users not logged that change the preference + $language = $saveLanguage; $smarty->assign('language', $language); } |