From d1e52ca9bc784d8d7e324a93b732f05e39a19706 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 1 Aug 2010 11:28:11 +0200 Subject: Add link to src.rpm, fixes #64 --- smarty/templates/rpmphp/zoom.tpl | 4 ++-- zoom.php | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/smarty/templates/rpmphp/zoom.tpl b/smarty/templates/rpmphp/zoom.tpl index 5841478..c2a5659 100644 --- a/smarty/templates/rpmphp/zoom.tpl +++ b/smarty/templates/rpmphp/zoom.tpl @@ -70,9 +70,9 @@ {if $p->repo_main neq $prev}{$p->repo_main}{/if} {$p->repo_sub} - + {if $p->epoch}{$p->epoch}:{/if} - {$p->ver}-{$p->rel} + {$p->ver}-{$p->rel} repo_main neq $prev} id="pkgdb_{$p->repo_main}_owner"{/if}> {if $p->repo_main neq $prev} diff --git a/zoom.php b/zoom.php index a353c77..55f2920 100644 --- a/zoom.php +++ b/zoom.php @@ -63,6 +63,8 @@ $smarty->assign('page_title', 'Package: ' . $name); function getBranchPeople($params) { global $fedpkg; + + $branch = $people = null; // avoid IDE warning extract($params); $ret = null; if ($branch == 'rawhide' && isset($fedpkg['devel']['owner']) ) { @@ -96,7 +98,8 @@ if ( !isset($name) || !$name ) { try { $db = new PDO ("mysql:dbname=" . MYBASE . ";host=" . MYHOST, MYUSER, MYPASS); - $sql = "SELECT rpm.* + $sql = "SELECT rpm.*, + 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' -- cgit