diff options
author | Marcin Juszkiewicz <hrw@openembedded.org> | 2007-07-05 16:33:02 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openembedded.org> | 2007-07-05 16:33:02 +0000 |
commit | f35bb30a937dafbafc3653e62108026270620a98 (patch) | |
tree | bb235fa88737ca3670d24d1226f26e3c17bc50a0 /contrib | |
parent | 8d3f7b27e80ba08d2dc0e8167f01d27527697e06 (diff) |
feed-browser: list of architectures from database instead of static list
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/feed-browser/includes/functions.inc | 4 | ||||
-rw-r--r-- | contrib/feed-browser/index.php | 25 |
2 files changed, 15 insertions, 14 deletions
diff --git a/contrib/feed-browser/includes/functions.inc b/contrib/feed-browser/includes/functions.inc index 23c7321a07..d49851f5b1 100644 --- a/contrib/feed-browser/includes/functions.inc +++ b/contrib/feed-browser/includes/functions.inc @@ -480,4 +480,8 @@ function read_vars_from_get($array_of_vars) } } +function get_arch_list() +{ + return db_query('SELECT DISTINCT p_arch FROM packages WHERE p_arch NOT IN (NULL, "", "all") ORDER BY p_arch ASC'); +} ?> diff --git a/contrib/feed-browser/index.php b/contrib/feed-browser/index.php index 366b4d76c0..fe67469fdb 100644 --- a/contrib/feed-browser/index.php +++ b/contrib/feed-browser/index.php @@ -59,6 +59,8 @@ elseif(!empty($pkgsearch)) $ipkgoutput = searchpkg("%{$pkgsearch}%", $arch); } +$archs_list = get_arch_list(); + ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> @@ -77,20 +79,15 @@ elseif(!empty($pkgsearch)) <input type="text" name="pkgsearch" 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> + <option value="all">no arch</option> +<?php + +foreach($archs_list as $arch) +{ + echo "<option value='{$arch['p_arch']}'>{$arch['p_arch']}</option>"; +} + +?> </select> <input type="submit" value="Search" /> </fieldset> |