From 6ad3c8191ec734ea3b789300ad9cce646dc764ec Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 3 Jan 2008 20:33:48 +0000 Subject: contrib/feed-browser/update.php: Allow to update individual feeds. --- contrib/feed-browser/update.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/feed-browser/update.php b/contrib/feed-browser/update.php index 53317ebb03..98751ea26c 100644 --- a/contrib/feed-browser/update.php +++ b/contrib/feed-browser/update.php @@ -46,9 +46,15 @@ if(!check_database()) $feeds = db_query("SELECT f_id, f_name, f_uri FROM feeds"); -if($argc > 1 AND $argv[1] == 'upgrades') +if($argc == 2) { - $feeds = db_query("SELECT f_id, f_name, f_uri FROM feeds WHERE f_type = 'upgrades'"); + $feeds = db_query("SELECT f_id, f_name, f_uri FROM feeds WHERE f_uri = '${argv[1]}'"); +} else if ($argc == 3 && $argv[1] == "--type") { + $feeds = db_query("SELECT f_id, f_name, f_uri FROM feeds WHERE f_type = '${argv[2]}'"); +} + +if (!$feeds) { + die("Cannot find feed(s) in the DB\n"); } $start = time(); -- cgit v1.2.3