diff options
author | Marcin Juszkiewicz <hrw@openembedded.org> | 2007-07-05 15:31:22 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openembedded.org> | 2007-07-05 15:31:22 +0000 |
commit | 66f69d475f74260170e0703e670a9870ab087f29 (patch) | |
tree | d8f8eba04e2a3e3873112cbba867ea6b4e2cfdd9 /contrib/feed-browser | |
parent | 6173da4b4f643877e3271a8fd8a7bbe79f43094d (diff) |
feed-browser: include architecture selector
Diffstat (limited to 'contrib/feed-browser')
-rw-r--r-- | contrib/feed-browser/includes/functions.inc | 13 | ||||
-rw-r--r-- | contrib/feed-browser/index.php | 39 |
2 files changed, 48 insertions, 4 deletions
diff --git a/contrib/feed-browser/includes/functions.inc b/contrib/feed-browser/includes/functions.inc index 2532dd7c08..5549aa578d 100644 --- a/contrib/feed-browser/includes/functions.inc +++ b/contrib/feed-browser/includes/functions.inc @@ -129,6 +129,17 @@ function searchpkg ($searchword) } } + +function searchpkgarch ($searchword, $searcharch) +{ + if($result = db_query("SELECT DISTINCT p_name,p_desc,p_section FROM packages WHERE p_name LIKE '$searchword' AND p_arch LIKE '$searcharch' ORDER BY p_name ASC")) + { + return generate_list_of_packages($result); + } +} + + + function generate_list_of_packages($query_result) { $ipkgoutput = "<table>\n"; @@ -443,7 +454,7 @@ function check_database() f_name varchar(32), f_uri varchar(100), f_type varchar(16) - )"); + f_comments varchar(500))"); insert_feeds ($db) ; } diff --git a/contrib/feed-browser/index.php b/contrib/feed-browser/index.php index 1c902ac66e..afa4c1a36a 100644 --- a/contrib/feed-browser/index.php +++ b/contrib/feed-browser/index.php @@ -49,6 +49,12 @@ if(isset($_GET['action'])) $action = $_GET['action']; } +if(isset($_GET['arch'])) +{ + $arch = $_GET['arch']; +} + + switch($action) { case "details": @@ -56,7 +62,12 @@ switch($action) break; case "search": - $ipkgoutput = searchpkg ("%{$name}%"); + if ( $arch == "" ) { + $ipkgoutput = searchpkg ("%{$name}%"); + } + else { + $ipkgoutput = searchpkgarch ("%{$name}%", "{$arch}"); + } break; case "section": @@ -65,8 +76,13 @@ switch($action) case "letter": $letter = $_GET['g']; - $ipkgoutput = searchpkg ("{$letter}%"); - break; + if ( $arch == "" ) { + $ipkgoutput = searchpkg ("{$letter}%"); + } + else { + $ipkgoutput = searchpkgarch ("{$letter}%", "{$arch}"); + } + break; default: $ipkgoutput = searchpkg("a"); @@ -89,6 +105,23 @@ switch($action) <fieldset> <label for="name">Package name</label> <input type="text" name="name" value="<?php echo $name; ?>" /> + <select name="arch"> + <option value="" selected="selected">all architectures</option> + <option value="all">noarch</option> + <option value="arm-oabi">arm OABI</option> + <option value="armv4t">armv4t EABI</option> + <option value="armv5te">armv5te EABI</option> + <option value="armv5teb">armv5teb EABI</option> + <option value="armv6">armv6 EABI</option> + <option value="avr32">avr32</option> + <option value="bfin">blackfin</option> + <option value="i486">i486</option> + <option value="i586">i586</option> + <option value="i686">i686</option> + <option value="iwmmxt">iwmmxt</option> + <option value="ppc603e">ppc603e</option> + <option value="sparc">sparc</option> + </select> <input type="hidden" name="action" value="search" /> <input type="submit" value="Search" /> </fieldset> |