summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2010-08-01 11:28:11 +0200
committerRemi Collet <fedora@famillecollet.com>2010-08-01 11:28:11 +0200
commitd1e52ca9bc784d8d7e324a93b732f05e39a19706 (patch)
treef3e7f55906ca2eb1cf02779509f1b20c35abf7c9
parentbbf5e00b574b69913fbffdaa2480c7307f6cf075 (diff)
Add link to src.rpm, fixes #64
-rw-r--r--smarty/templates/rpmphp/zoom.tpl4
-rw-r--r--zoom.php5
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 @@
<tr class="{if $smarty.foreach.plist.iteration % 2 eq 0}even{else}odd{/if}">
<td>{if $p->repo_main neq $prev}<strong>{$p->repo_main}</strong>{/if}</td>
<td>{$p->repo_sub}</td>
- <td>
+ <td><a href='{$p->rpmurl}' alt='Download source RPM'>
{if $p->epoch}{$p->epoch}:{/if}
- {$p->ver}-{$p->rel}
+ {$p->ver}-{$p->rel}</a>
</td>
<td{if $p->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'