From 61b4b0bb672b02698aa4ee479b69ab5f7264dd42 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Thu, 5 Jul 2007 15:56:42 +0000 Subject: feed-browser: use read_vars_from_get to handle HTTP GET params --- contrib/feed-browser/index.php | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'contrib/feed-browser/index.php') diff --git a/contrib/feed-browser/index.php b/contrib/feed-browser/index.php index 2c984419ed..0c9f17edc2 100644 --- a/contrib/feed-browser/index.php +++ b/contrib/feed-browser/index.php @@ -38,30 +38,12 @@ if(!check_database()) die("Database not found and cannot be created."); } -$name = ''; - -if(isset($_GET['name'])) -{ - $name = $_GET['name']; -} - -$action = ''; - -if(isset($_GET['action'])) -{ - $action = $_GET['action']; -} - -if(isset($_GET['arch'])) -{ - $arch = $_GET['arch']; -} - +read_vars_from_get(array('name', 'arch', 'action', 'letter', 'pnm', 'section')); switch($action) { case "details": - $ipkgoutput = pkgdetails ($_GET['pnm']); + $ipkgoutput = pkgdetails ($pnm); break; case "search": @@ -74,11 +56,10 @@ switch($action) break; case "section": - $ipkgoutput = searchsection($_GET['section']); + $ipkgoutput = searchsection($section); break; case "letter": - $letter = $_GET['g']; if ( $arch == "" ) { $ipkgoutput = searchpkg ("{$letter}%"); } -- cgit v1.2.3