diff options
author | Paul Sokolovsky <pmiscml@gmail.com> | 2008-01-03 20:33:48 +0000 |
---|---|---|
committer | Paul Sokolovsky <pmiscml@gmail.com> | 2008-01-03 20:33:48 +0000 |
commit | 6ad3c8191ec734ea3b789300ad9cce646dc764ec (patch) | |
tree | 8990f0c867a62144baf2de43e3aca00a2520483d /contrib | |
parent | 3ed7a06c4169967775fbb39656d0bbcf078be089 (diff) |
contrib/feed-browser/update.php: Allow to update individual feeds.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/feed-browser/update.php | 10 |
1 files changed, 8 insertions, 2 deletions
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(); |