|
|
|
@ -54,6 +54,7 @@ class Pref_Prefs extends Handler_Protected {
|
|
|
|
|
"USER_STYLESHEET" => array(__("Customize stylesheet"), __("Customize CSS stylesheet to your liking")),
|
|
|
|
|
"USER_TIMEZONE" => array(__("User timezone"), ""),
|
|
|
|
|
"VFEED_GROUP_BY_FEED" => array(__("Group headlines in virtual feeds"), __("Special feeds, labels, and categories are grouped by originating feeds")),
|
|
|
|
|
"USER_LANGUAGE" => array(__("Language")),
|
|
|
|
|
"USER_CSS_THEME" => array(__("Select theme"), __("Select one of the available CSS themes"))
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
@ -111,18 +112,13 @@ class Pref_Prefs extends Handler_Protected {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($pref_name == "language") {
|
|
|
|
|
if ($pref_name == "USER_LANGUAGE") {
|
|
|
|
|
if ($_SESSION["language"] != $value) {
|
|
|
|
|
setcookie("ttrss_lang", $value,
|
|
|
|
|
time() + COOKIE_LIFETIME_LONG);
|
|
|
|
|
$_SESSION["language"] = $value;
|
|
|
|
|
|
|
|
|
|
$need_reload = true;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
set_pref($pref_name, $value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
set_pref($pref_name, $value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($need_reload) {
|
|
|
|
@ -543,22 +539,6 @@ class Pref_Prefs extends Handler_Protected {
|
|
|
|
|
print "<tr><td colspan=\"3\"><h3>".$section_name."</h3></td></tr>";
|
|
|
|
|
|
|
|
|
|
$lnum = 0;
|
|
|
|
|
|
|
|
|
|
if ($active_section == 2) {
|
|
|
|
|
print "<tr>";
|
|
|
|
|
|
|
|
|
|
print "<td width=\"40%\" class=\"prefName\">";
|
|
|
|
|
print "<label>";
|
|
|
|
|
print __("Language:");
|
|
|
|
|
print "</label>";
|
|
|
|
|
|
|
|
|
|
print "<td>";
|
|
|
|
|
print_select_hash("language", $_COOKIE["ttrss_lang"], get_translations(),
|
|
|
|
|
"style='width : 220px; margin : 0px' dojoType='dijit.form.Select'");
|
|
|
|
|
print "</td>";
|
|
|
|
|
print "</tr>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
print "<tr>";
|
|
|
|
@ -574,7 +554,11 @@ class Pref_Prefs extends Handler_Protected {
|
|
|
|
|
|
|
|
|
|
print "<td class=\"prefValue\">";
|
|
|
|
|
|
|
|
|
|
if ($pref_name == "USER_TIMEZONE") {
|
|
|
|
|
if ($pref_name == "USER_LANGUAGE") {
|
|
|
|
|
print_select_hash($pref_name, $value, get_translations(),
|
|
|
|
|
"style='width : 220px; margin : 0px' dojoType='dijit.form.Select'");
|
|
|
|
|
|
|
|
|
|
} else if ($pref_name == "USER_TIMEZONE") {
|
|
|
|
|
|
|
|
|
|
$timezones = explode("\n", file_get_contents("lib/timezones.txt"));
|
|
|
|
|
|
|
|
|
|