From 2e536ba1dc043568ef443f2177657e43527d35b1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 29 May 2010 02:25:18 +0800 Subject: Display pkgdb info on package info page --- zoom.php | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) (limited to 'zoom.php') diff --git a/zoom.php b/zoom.php index f3c8bf8..09f37f4 100644 --- a/zoom.php +++ b/zoom.php @@ -1,6 +1,10 @@ $name not found\n"; } else { + echo "

Package: $name

\n"; + + if (isset($_GET['pkgdb'])) { + $fedpkg = $fedcli->getPackageInfo($name); + echo "

Hide pkgdb informations

"; + } else { + $fedpkg = false; + echo "

Show more informations from pkgdb

"; + } echo "\n"; echo "\n"; $i=0; @@ -69,6 +82,10 @@ if (!$name) { echo "\n"; } + if (isset($fedpkg['devel']['package']['description'])) { + echo "\n"; + } if ($rpm->url) { echo "\n"; @@ -109,15 +126,32 @@ if (!$name) { echo "
Upstream info
"; $i++; echo "Summary: ". $owner->summary . "
"; $i++; + echo "Description: ".$fedpkg['devel']['package']['description']."
"; $i++; echo "URL: ". $rpm->url . "
\n"; echo "\n"; + echo "\n"; $prev=false; do { + if ($rpm->repo_main=='rawhide' && isset($fedpkg['devel']['owner'])) { + $owner = $fedpkg['devel']['owner']; + $people = $fedpkg['devel']['people']; + } else if (isset($fedpkg[$rpm->repo_main]['owner'])) { + $owner = $fedpkg[$rpm->repo_main]['owner']; + $people = $fedpkg[$rpm->repo_main]['people']; + } else { + $owner =" "; + $people = false; + } + $comaint = ''; + if ($people) foreach ($people as $user) { + if (isset($user['aclOrder']['commit']['statuscode']) && $user['aclOrder']['commit']['statuscode']==3) { + $comaint .= $user['username']; + } + } echo ""; $i++; echo ""; echo ""; echo ""; - echo "\n"; + echo "\n"; } while ($rpm = $resrpm->fetchObject()); - echo "
Packages available in Fedora Repositories
BranchRepositoryVersion-ReleaseOwnerCo-maintainers
".($rpm->repo_main==$prev ? " " : $prev=$rpm->repo_main)."".$rpm->repo_sub."".($rpm->epoch ? $rpm->epoch.":" : "").$rpm->ver."-".$rpm->rel."
$owner$comaint
"; + echo ""; } } catch(PDOException $e) { -- cgit