summaryrefslogtreecommitdiff
path: root/contrib/feed-browser
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openembedded.org>2006-08-25 06:57:46 +0000
committerMarcin Juszkiewicz <hrw@openembedded.org>2006-08-25 06:57:46 +0000
commitd48bb1938aa810fca92f1f02d01d593a818da92c (patch)
tree92c019a0680866d70c722f0d325eb0453e3e1a73 /contrib/feed-browser
parent18ec3299e94fd9f8ad3965a077507c91b15cba75 (diff)
feed-browser: show links to all depends/provides/conflicts, show packages not only by Name: but also by Provides:
Diffstat (limited to 'contrib/feed-browser')
-rw-r--r--contrib/feed-browser/index.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/contrib/feed-browser/index.php b/contrib/feed-browser/index.php
index a23a713c36..3b1230ce22 100644
--- a/contrib/feed-browser/index.php
+++ b/contrib/feed-browser/index.php
@@ -288,7 +288,8 @@ function searchsection($section)
function pkgdetails ($package)
{
$result = db_query("SELECT * FROM packages,feeds
- WHERE packages.p_name='$package' AND feeds.f_name = packages.p_feed
+ WHERE (packages.p_name='$package' OR packages.p_provides='$package')
+ AND feeds.f_name = packages.p_feed
ORDER BY packages.p_version DESC, feeds.f_name ASC, packages.p_arch DESC ");
// display first result
@@ -410,20 +411,17 @@ function pkgdetails ($package)
function addlinks ($input)
{
// split input elements up
- $elements = preg_split ('/[\s,]+/', $input);
+ $elements = explode (', ', $input);
$offset = 0;
foreach ($elements as $element)
{
- // skip version information and empty elements (shouldn't happend)
- if (!eregi('^([0-9a-z\-]*)$', $element) OR empty($element))
- {
- continue;
- }
+ // strip version number
+ $element = ereg_replace('^(.*)( \((.*)\))+$', '\\1', $element);
// do we have this package in the db?
- $result = db_query ("SELECT DISTINCT p_name FROM packages WHERE p_name='{$element}'");
+ $result = db_query ("SELECT DISTINCT p_name FROM packages WHERE p_name='{$element}' OR p_provides='{$element}'");
if(isset($result[0]['p_name']))
{
@@ -443,7 +441,6 @@ function addlinks ($input)
}
}
-
return $input;
}