Commit fb4bb505 authored by sylvieg's avatar sylvieg

[FIX]language: serialize/unserialize avaialble language just when save in the database

parent 385f5c7f
......@@ -11,5 +11,4 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
$languages = array();
$languages = $tikilib->list_languages(false, 'y');
$smarty->assign_by_ref('languages', $languages);
$smarty->assign("available_languages", unserialize($tikilib->get_preference("available_languages")));
?>
......@@ -12,7 +12,6 @@ if(isset($_COOKIE['tiki-theme']) && !($feature_userPreferences == 'y' && $user &
}
$smarty->assign('styleslist',$tikilib->list_styles());
$smarty->assign("available_styles", unserialize($tikilib->get_preference("available_styles")));
if(isset($style)){
$smarty->assign('styleName', ereg_replace($tikidomain."/", "", $style));
......
......@@ -38,29 +38,13 @@ ask_ticket('admin-inc-i18n');
$pref_byref_values = array(
"language",
'available_language'
);
foreach ($pref_byref_values as $britem) {
byref_set_value ($britem);
simple_set_value ($britem);
}
if (isset($_REQUEST["change_language"]) && isset($_REQUEST["available_languages"])) {
$tikilib->set_preference("available_languages", serialize($_REQUEST["available_languages"]));
} else {
$tikilib->set_preference("available_languages", serialize(array()));
}
}
$smarty->assign("available_languages", unserialize($tikilib->get_preference("available_languages")));
$smarty->assign("language", $tikilib->get_preference("language", "en"));
?>
<?php
// $Header: /cvsroot/tikiwiki/tiki/tiki-admin_include_login.php,v 1.59 2007-10-05 16:57:11 sylvieg Exp $
// $Header: /cvsroot/tikiwiki/tiki/tiki-admin_include_login.php,v 1.60 2007-10-05 17:05:17 sylvieg Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
......@@ -189,9 +189,6 @@ $smarty->assign_by_ref('languages', $languages);
$smarty->assign("styles", $tikilib->list_styles());
$smarty->assign("available_languages", unserialize($tikilib->get_preference("available_languages")));
$smarty->assign("available_styles", unserialize($tikilib->get_preference("available_styles")));
$listTrackers = $tikilib->list_trackers(0,-1,"name_desc","");
$smarty->assign("listTrackers",$listTrackers['list']);
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/tiki-edit_translation.php,v 1.14 2007-03-06 19:29:48 sylvieg Exp $
// $Header: /cvsroot/tikiwiki/tiki/tiki-edit_translation.php,v 1.15 2007-10-05 17:11:24 sylvieg Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......@@ -171,9 +171,7 @@ $trads = $multilinguallib->getTranslations($type, $objId, $name, $langpage, true
$smarty->assign('trads', $trads);
$languages = $tikilib->list_languages();
$available_languages = unserialize($tikilib->get_preference("available_languages"));
$smarty->assign_by_ref('languages', $languages);
$smarty->assign_by_ref('available_languages', $available_languages);
ask_ticket('edit-translation');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment