From 505f2f0e6cd16c885096c6f02273016fb9ab3c52 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 20 Jan 2010 13:20:20 +0300 Subject: [PATCH] pref-prefs: show default update interval as a dropdown --- backend.php | 10 ++++++++++ modules/pref-prefs.php | 8 +++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/backend.php b/backend.php index 7757931f3..b9b60a542 100644 --- a/backend.php +++ b/backend.php @@ -123,6 +123,16 @@ 1440 => __("Daily"), 10080 => __("Weekly")); + $update_intervals_nodefault = array( + -1 => __("Disable updates"), + 15 => __("Each 15 minutes"), + 30 => __("Each 30 minutes"), + 60 => __("Hourly"), + 240 => __("Each 4 hours"), + 720 => __("Each 12 hours"), + 1440 => __("Daily"), + 10080 => __("Weekly")); + $update_methods = array( 0 => __("Default"), 1 => __("Magpie"), diff --git a/modules/pref-prefs.php b/modules/pref-prefs.php index 9b58cdbb4..da5ae60bf 100644 --- a/modules/pref-prefs.php +++ b/modules/pref-prefs.php @@ -368,7 +368,13 @@ print ""; - if ($type_name == "bool") { + if ($pref_name == "DEFAULT_UPDATE_INTERVAL") { + + global $update_intervals_nodefault; + + print_select_hash($pref_name, $value, $update_intervals_nodefault); + + } else if ($type_name == "bool") { // print_select($pref_name, $value, array("true", "false")); if ($value == "true") {