From c0f960ee9df9f90454bccdc8d200e6b40f158d61 Mon Sep 17 00:00:00 2001 From: "Johan \"Papa\" Cwiklinski" Date: Sat, 29 May 2010 22:08:45 +0200 Subject: Apply PEAR coding standards, add license tag, refs #46,48 --- zoom.php | 77 ++++++++++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 19 deletions(-) (limited to 'zoom.php') diff --git a/zoom.php b/zoom.php index dba885a..dfcdc95 100644 --- a/zoom.php +++ b/zoom.php @@ -1,19 +1,40 @@ . + * Display informations from a specific package + * + * PHP version 5 + * + * Copyright © 2010 Remi Collet + * + * This file is part of rpmphp. + * + * rpmphp is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * rpmphp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with rpmphp. If not, see . + * + * @category Main + * @package RPMPHP + * + * @author Remi Collet + * @author Johan Cwiklinski + * @copyright 2010 Remi Collet + * @license http://www.gnu.org/licenses/agpl-3.0-standalone.html AGPL License 3.0 or (at your option) any later version + * @version SVN: $Id: ajouter_adherent.php 836 2010-02-27 08:11:44Z trashy $ + * @link http://github.com/remicollet/rpmphp/ + * @since The begining of times. + */ require 'main.inc.php'; require 'FedoraClient.php'; @@ -27,11 +48,20 @@ $ariane[] = array( 'url' => '#', 'text' => 'Package: ' . $name ); -$ajax_infos = '(wait for ajax or reload with pkgdb)'; +$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); +/** +* Retrieve people informations for a specific branch +* +* @param array $params Array of parameters +* +* @return string +*/ function getBranchPeople($params) { global $fedpkg; @@ -92,7 +122,11 @@ if ( !isset($name) || !$name ) { } else if ($owner->summary) { $summary['Summary'] = $owner->summary; } - $summary['Description'] = ((isset($fedpkg['devel']['package']['description'])) ? $fedpkg['devel']['package']['description'] : $ajax_infos); + $summary['Description'] = ( + (isset($fedpkg['devel']['package']['description'])) ? + $fedpkg['devel']['package']['description'] : + $ajax_infos + ); if ( $rpm->url ) { $summary['URL'] = $rpm->url; } @@ -107,7 +141,8 @@ if ( !isset($name) || !$name ) { } if ($up && $up->unstable && $up->stable!=$up->unstable) { if ($up->state) { - $summary['Unstable version'] = $up->unstable . ' (' . $up->state . ')'; + $summary['Unstable version'] = $up->unstable . ' (' . + $up->state . ')'; } else { $summary['Unstable version'] = $up->unstable; } @@ -119,7 +154,8 @@ if ( !isset($name) || !$name ) { $summary['Owner'] = $owner->owner; } } - $summary['ViewVC'] = 'http://cvs.fedoraproject.org/viewvc/rpms/' . $name . '/'; + $summary['ViewVC'] = 'http://cvs.fedoraproject.org/viewvc/rpms/' . + $name . '/'; if (isset($_GET['pkgdb'])) { $fedpkg = $fedcli->getPackageInfo($name); @@ -141,7 +177,10 @@ if ( !isset($name) || !$name ) { $smarty->assign('packages', $packages); $smarty->assign('fedpkg', $fedpkg); } catch(PDOException $e) { - printf("%s ERREUR : %s\n", date("r"), $e->getMessage()); + $smarty->assign( + 'error', + sprintf("%s ERREUR : %s\n", date("r"), $e->getMessage()) + ); } } -- cgit