From 3907ef7111ec9c5ec0e453a3216fdeeed2eb4c26 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 20 Jan 2009 13:35:59 +0100 Subject: purge feeds after updating --- modules/pref-feeds.php | 27 +++++++++++++++++---------- modules/pref-prefs.php | 5 +++++ 2 files changed, 22 insertions(+), 10 deletions(-) (limited to 'modules') diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 8b715e48f..532a8f531 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -276,15 +276,19 @@ print_select_hash("update_method", $update_method, $update_methods); } - /* Purge intl */ + if (FORCE_ARTICLE_PURGE == 0) { - print "
"; + /* Purge intl */ + + print "
"; + + $purge_interval = db_fetch_result($result, 0, "purge_interval"); - $purge_interval = db_fetch_result($result, 0, "purge_interval"); + print __('Article purging:') . " "; - print __('Article purging:') . " "; + print_select_hash("purge_interval", $purge_interval, $purge_intervals); - print_select_hash("purge_interval", $purge_interval, $purge_intervals); + } print ""; print "
".__("Authentication")."
"; @@ -469,14 +473,17 @@ /* Purge intl */ - print "
"; + if (FORCE_ARTICLE_PURGE != 0) { - print __('Article purging:') . " "; + print "
"; - print_select_hash("purge_interval", $purge_interval, $purge_intervals, - "disabled"); + print __('Article purging:') . " "; - batch_edit_cbox("purge_interval"); + print_select_hash("purge_interval", $purge_interval, $purge_intervals, + "disabled"); + + batch_edit_cbox("purge_interval"); + } print ""; print "
".__("Authentication")."
"; diff --git a/modules/pref-prefs.php b/modules/pref-prefs.php index 987a093c0..80a63cb9e 100644 --- a/modules/pref-prefs.php +++ b/modules/pref-prefs.php @@ -15,6 +15,11 @@ $prefs_blacklist = array("HIDE_FEEDLIST", "SYNC_COUNTERS", "ENABLE_LABELS"); + if (FORCE_ARTICLE_PURGE != 0) { + array_push($prefs_blacklist, "PURGE_OLD_DAYS"); + array_push($prefs_blacklist, "PURGE_UNREAD_ARTICLES"); + } + if ($subop == "change-password") { $old_pw = $_POST["OLD_PASSWORD"]; -- cgit v1.2.3