From 984fed1620d14acf0009122f578a59cdfba5b287 Mon Sep 17 00:00:00 2001 From: "Johan \"Papa\" Cwiklinski" Date: Sat, 29 May 2010 21:08:26 +0200 Subject: Missing file in last commit ; refs #47 --- zoom.php | 227 ++++++++++++++++++++++++--------------------------------------- 1 file changed, 85 insertions(+), 142 deletions(-) (limited to 'zoom.php') diff --git a/zoom.php b/zoom.php index a7cf0d2..913ce18 100644 --- a/zoom.php +++ b/zoom.php @@ -1,53 +1,51 @@ (wait for ajax or reload with pkgdb)'; -?> - - - - Packages in Fedora - - - - - - - -assign('name', $name); +$ariane[] = array( + 'url' => '#', + 'text' => 'Package: ' . $name +); +$ajax_infos = '(wait for ajax or reload with pkgdb)'; +$smarty->assign('ajax_infos', $ajax_infos); +$smarty->assign('ariane', $ariane); +$smarty->assign('page_title', 'Package: ' . $name); + +function getBranchPeople($params) +{ + global $fedpkg; + extract($params); + $ret = null; + if ($branch == 'rawhide' && isset($fedpkg['devel']['owner']) ) { + if ( !$people || $people == '' || $people == 'owner' ) { + $ret = $fedpkg['devel']['owner']; + } else if( $people == 'people') { + $ret_tmp = $fedpkg['devel']['people']; + } + } else if (isset($fedpkg[$branch]['owner'])) { + if ( !$people || $people == '' || $people == 'owner' ) { + $ret = $fedpkg[$branch]['owner']; + } else if( $people == 'people') { + $ret_tmp = $fedpkg[$branch]['people']; + } + } + if( $people == 'people') { + foreach ( $ret_tmp as $r ) { + if ( $ret !== null ) { + $ret .= ', '; + } + $ret .= $r['username']; + } + } + return $ret; } -?> - - - +$smarty->register_function('getBranchPeople', 'getBranchPeople'); - -
- -
-
-

You are here:

- -
-

Missing package name

@@ -81,124 +79,69 @@ if ( !isset($name) || !$name ) { echo "

$name not found

\n"; } else { - echo "

Package: $name

\n"; + if ($rpm->summary) { + $summary['Summary'] = $rpm->summary; + } else if ($owner->summary) { + $summary['Summary'] = $owner->summary; + } + $summary['Description'] = ((isset($fedpkg['devel']['package']['description'])) ? $fedpkg['devel']['package']['description'] : $ajax_infos); + if ( $rpm->url ) { + $summary['URL'] = $rpm->url; + } + if ($up && $up->type) { + $summary['Type'] = $up->type; + } + if ($up && $up->channel) { + $summary['Channel'] = $up->channel; + } + if ($up && $up->stable) { + $summary['Stabe version'] = $up->stable; + } + if ($up && $up->unstable && $up->stable!=$up->unstable) { + if ($up->state) { + $summary['Unstable version'] = $up->unstable . ' (' . $up->state . ')'; + } else { + $summary['Unstable version'] = $up->unstable; + } + + } + if ($owner && $owner->owner) { + if ($owner->cc) { + $summary['Owner'] = $owner->owner . ' (' . $owner->cc . ')'; + } else { + $summary['Owner'] = $owner->owner; + } + } + $summary['ViewVC'] = 'http://cvs.fedoraproject.org/viewvc/rpms/' . $name . '/'; + 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; - - if ($rpm->summary) { - echo "\n"; - } else if ($owner->summary) { - echo "\n"; } + $i=0; - echo "\n"; - - if ($rpm->url) { - echo "\n"; - } - if ($up && $up->type) { - echo "\n"; - } - if ($up && $up->channel) { - echo "\n"; - } - if ($up && $up->stable) { - echo "\n"; - } - if ($up && $up->unstable && $up->stable!=$up->unstable) { - echo "\n"; - } - if ($owner && $owner->owner) { - echo "\n"; - } - echo ""; $i++; - echo "\n"; - - echo "
Upstream info
"; $i++; - echo "Summary: ". $rpm->summary . "
"; $i++; - echo "Summary: ". $owner->summary . "
"; $i++; - echo "Description: " . ((isset($fedpkg['devel']['package']['description'])) ? $fedpkg['devel']['package']['description'] : $ajax_infos) . "
"; $i++; - echo "URL: ". $rpm->url . "
"; $i++; - echo "Type: ". $up->type . "
"; $i++; - echo "Channel: ". $up->channel . "
"; $i++; - echo "Stable version: ". $up->stable . "
"; $i++; - echo "Unstable version: ". $up->unstable . ""; - if ($up->state) { - echo " (". $up->state . ")\n"; - } - echo "
"; $i++; - echo "Owner: ". $owner->owner . ""; - if ($owner->cc) { - echo " (". $owner->cc . ")\n"; - } - echo "
ViewVC: http://cvs.fedoraproject.org/viewvc/rpms/$name/"; - echo "
"; - - echo "\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) { - if ( $comaint !== '' ) { - $comaint .= ', '; - } - $comaint .= $user['username']; - } - } - echo ""; $i++; - echo ""; - echo ""; - echo ""; - $id = 'pkgdb_' . $rpm->repo_main; - if ( $rpm->repo_main != $prev ) { - echo "\n"; - } else { - echo ''; - } + $packages[] = $rpm; if( $rpm->repo_main != $prev ) { $prev = $rpm->repo_main; } } while ($rpm = $resrpm->fetchObject()); - echo "
Packages available in Fedora Repositories
BranchRepositoryVersion-ReleaseOwnerCo-maintainers
".($rpm->repo_main==$prev ? " " : $rpm->repo_main)."".$rpm->repo_sub."".($rpm->epoch ? $rpm->epoch.":" : "").$rpm->ver."-".$rpm->rel."" . (($fedpkg) ? $owner : $ajax_infos) . "" . (($fedpkg) ? $comaint : $ajax_infos) . "
  
"; } } catch(PDOException $e) { printf("%s ERREUR : %s\n", date("r"), $e->getMessage()); } } -?> - - - -
- - -
- - +$smarty->assign('pkgdb', (isset($_GET['pkgdb']) ? $_GET['pkgdb'] : null)); +$smarty->assign('summary', $summary); +$smarty->assign('packages', $packages); +$smarty->assign('fedpkg', $fedpkg); +$page_content = $smarty->fetch('zoom.tpl'); +$smarty->assign('page_content', $page_content); +$smarty->display('main.tpl'); +?> \ No newline at end of file -- cgit