summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--class/Parser.php2
-rw-r--r--zoom.php7
2 files changed, 7 insertions, 2 deletions
diff --git a/class/Parser.php b/class/Parser.php
index 79d1282..365f0f8 100644
--- a/class/Parser.php
+++ b/class/Parser.php
@@ -218,6 +218,7 @@ class Parser
foreach ($primary->package as $package) {
if ($package->attributes()=='rpm') {
$ver = $package->version->attributes();
+ $loc = $package->location->attributes();
$input = array(
'repo_main' => $row['main'],
@@ -227,6 +228,7 @@ class Parser
'ver' => $ver['ver'],
'rel' => $ver['rel'],
'summary' => $package->summary,
+ 'location' => $loc['href'],
'url' => $package->url
);
if ($rpmtable->add($input)) {
diff --git a/zoom.php b/zoom.php
index b4fb513..a0a500e 100644
--- a/zoom.php
+++ b/zoom.php
@@ -99,8 +99,8 @@ if ( !isset($name) || !$name ) {
$uptable = new TableUpstream($db);
// Consider each part of ver/rel as integer except second part of rel (generally distro name)
- $sql = "SELECT rpm.*, repo.active,
- CONCAT(repo.url,rpm.name,'-',rpm.ver,'-',rpm.rel,'.src.rpm') as rpmurl
+ $sql = "SELECT rpm.*, repo.active, repo.url as repourl,
+ CONCAT(repo.url ,rpm.name,'-',rpm.ver,'-',rpm.rel,'.src.rpm') as rpmurl
FROM rpm
INNER JOIN repo ON (repo.main=rpm.repo_main AND repo.sub=rpm.repo_sub)
WHERE rpm.name='$name'
@@ -185,6 +185,9 @@ if ( !isset($name) || !$name ) {
$prev=false;
do {
+ if ($rpm->location) {
+ $rpm->rpmurl = $rpm->repourl . $rpm->location;
+ }
$packages[] = $rpm;
if ( $rpm->repo_main != $prev ) {
$prev = $rpm->repo_main;