From f35bb30a937dafbafc3653e62108026270620a98 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Thu, 5 Jul 2007 16:33:02 +0000 Subject: feed-browser: list of architectures from database instead of static list --- contrib/feed-browser/includes/functions.inc | 4 ++++ contrib/feed-browser/index.php | 25 +++++++++++-------------- 2 files changed, 15 insertions(+), 14 deletions(-) (limited to 'contrib') 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(); + ?> @@ -77,20 +79,15 @@ elseif(!empty($pkgsearch)) -- cgit v1.2.3