summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--zoom.php77
1 files changed, 58 insertions, 19 deletions
diff --git a/zoom.php b/zoom.php
index dba885a..dfcdc95 100644
--- a/zoom.php
+++ b/zoom.php
@@ -1,19 +1,40 @@
<?php
+
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+
/**
-* 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 <http://www.gnu.org/licenses/agpl-3.0-standalone.html>.
+ * 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 <http://www.gnu.org/licenses/>.
+ *
+ * @category Main
+ * @package RPMPHP
+ *
+ * @author Remi Collet <unknown@unknwown.com>
+ * @author Johan Cwiklinski <johan@x-tnd.be>
+ * @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 = '<span class="ajax">(wait for ajax or <a href="' . $_SERVER['PHP_SELF'] . '?rpm='.$name.'&amp;pkgdb=1">reload with pkgdb</a>)</span>';
+$ajax_infos = '<span class="ajax">(wait for ajax or <a href="' .
+ $_SERVER['PHP_SELF'] . '?rpm='.$name.
+ '&amp;pkgdb=1">reload with pkgdb</a>)</span>';
$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())
+ );
}
}