summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--FedoraClient.php2
-rw-r--r--README4
-rw-r--r--index.php2
-rw-r--r--main.inc.php9
-rw-r--r--pkgdb-ajax.php3
-rw-r--r--scripts/rpmphp.js2
-rw-r--r--smarty/templates/rpmphp/index.tpl4
-rw-r--r--smarty/templates/rpmphp/zoom.tpl4
-rw-r--r--zoom.php13
9 files changed, 34 insertions, 9 deletions
diff --git a/FedoraClient.php b/FedoraClient.php
index 6eca761..4a7cfd6 100644
--- a/FedoraClient.php
+++ b/FedoraClient.php
@@ -21,7 +21,7 @@
*
*/
-define ('FEDORACLIENT_VERSION','0.1');
+define ('FEDORACLIENT_VERSION','0.1.0-dev');
if (!function_exists('curl_version')) {
die("curl extension required\n");
diff --git a/README b/README
index a429120..83b0578 100644
--- a/README
+++ b/README
@@ -3,6 +3,10 @@ This repository manage sources of PHP scripts use to generate reports for
Packages in Fedora repositories
http://rpms.famillecollet.com/rpmphp/
+
+ Project page
+
+ http://redmine.ulysses.fr/projects/rpmphp
In order to use this software, you will need to install:
- PHP 5 (5.3+)
diff --git a/index.php b/index.php
index 341a894..f7a1546 100644
--- a/index.php
+++ b/index.php
@@ -69,6 +69,8 @@ try {
sprintf("%s ERREUR : %s\n", date("r"), $e->getMessage())
);
}
+$smarty->assign('rpmphp_version', RPMPHP_VERSION);
+$smarty->assign('fedcli_version', FEDORACLIENT_VERSION);
$page_content = $smarty->fetch('index.tpl');
$smarty->assign('page_content', $page_content);
diff --git a/main.inc.php b/main.inc.php
index bbc300c..a846e16 100644
--- a/main.inc.php
+++ b/main.inc.php
@@ -33,8 +33,11 @@
* @link http://github.com/remicollet/rpmphp/
* @since The begining of times.
*/
+define('RPMPHP_VERSION', '1.0.0-dev');
+
require 'config.inc.php';
require '/usr/share/php/Smarty/Smarty.class.php';
+require 'FedoraClient.php';
$smarty = new Smarty();
@@ -43,9 +46,9 @@ $smarty->compile_dir = 'smarty/templates_c';
$smarty->cache_dir = 'smarty/cache';
$smarty->config_dir = 'smarty/configs';
-$ariane[] = array(
- 'url' => './',
- 'text' => 'Reports home'
+$ariane[] = array (
+ 'url' => './',
+ 'text' => 'Reports home'
);
/**
diff --git a/pkgdb-ajax.php b/pkgdb-ajax.php
index 5cff16c..b92a5c4 100644
--- a/pkgdb-ajax.php
+++ b/pkgdb-ajax.php
@@ -1,6 +1,6 @@
<?php
header('Content-Type: application/json;charset=utf-8');
-require 'FedoraClient.php';
+require 'main.inc.php';
$name = $_GET['name'];
if ( !isset($name) || !$name ) {
@@ -41,6 +41,7 @@ if ( !isset($name) || !$name ) {
);
}
$fedpkg[$k]['people'] = $new_people;
+ $fedpkg[$k]['package']['description'] = nl2br($fedpkg[$k]['package']['description']);
}
}
}
diff --git a/scripts/rpmphp.js b/scripts/rpmphp.js
index 7898986..7dfe0b5 100644
--- a/scripts/rpmphp.js
+++ b/scripts/rpmphp.js
@@ -7,7 +7,7 @@ function initZoomJS(name)
if ( data.error ) {
alert(data.error);
} else {
- $('#' + name + '_desc').empty().text(data.devel.package.description);
+ $('#' + name + '_desc').empty().html(data.devel.package.description);
$.each(
data,
function(k, v){
diff --git a/smarty/templates/rpmphp/index.tpl b/smarty/templates/rpmphp/index.tpl
index 2aeb00b..3cd47b0 100644
--- a/smarty/templates/rpmphp/index.tpl
+++ b/smarty/templates/rpmphp/index.tpl
@@ -55,6 +55,8 @@
</tbody>
</table><!-- /list-pacakges -->
<h2>Script sources</h2>
- <p>You can retrieve the current application sources from my GIT repository on github.com: <a href='http://github.com/remicollet/rpmphp'>http://github.com/remicollet/rpmphp</a>.</p>
+ <p>License : RPMPHP version {$rpmphp_version} is <a href='http://www.gnu.org/licenses/agpl.html' alt='AGPL'>AGPL</a>,
+ FedoraClient version {$fedcli_version} is <a href='http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html' alt='LGPLv2+'>LGPLv2+</a>,
+ <p>You can retrieve the current application sources from my <a href='http://github.com/remicollet/rpmphp'>GIT repository on github.com</a>.</p>
<p>Feedbacks, RFE and patches are welcome.</p>
diff --git a/smarty/templates/rpmphp/zoom.tpl b/smarty/templates/rpmphp/zoom.tpl
index 6031a69..704c6b7 100644
--- a/smarty/templates/rpmphp/zoom.tpl
+++ b/smarty/templates/rpmphp/zoom.tpl
@@ -41,7 +41,9 @@
<tr>
<th>{$k}:</th>
<td{if $k eq 'Description'} id="{$name}_desc"{/if}>
- {if $k eq 'URL' or $k eq 'ViewVC'}
+ {if $k eq 'Bugzilla'}
+ <a href="{$v}">Active bugs</a>
+ {elseif $k eq 'URL' or $k eq 'ViewVC'}
<a href="{$v}">{$v}</a>
{else}
{$v}
diff --git a/zoom.php b/zoom.php
index d115fa2..0ea20cf 100644
--- a/zoom.php
+++ b/zoom.php
@@ -35,7 +35,6 @@
* @since The begining of times.
*/
require 'main.inc.php';
-require 'FedoraClient.php';
$fedcli = new FedoraPkgdb();
@@ -113,6 +112,13 @@ if ( !isset($name) || !$name ) {
$resown=$db->query($sql);
$owner = ($resown ? $resown->fetchObject() : false);
+ if (isset($owner->name)) {
+ // Use exact name (with case) from acl (else pkgdb could fail)
+ $name = $owner->name;
+ $smarty->assign('name', $name);
+ $smarty->assign('page_title', 'Package: ' . $name);
+ }
+
if (!$rpm) {
echo "<h1>$name not found</h1>\n";
} else {
@@ -152,6 +158,11 @@ if ( !isset($name) || !$name ) {
} else {
$summary['Owner'] = $owner->owner;
}
+
+ // Only when owner (so we have the exact name)
+ $summary['Bugzilla'] = 'https://bugzilla.redhat.com/buglist.cgi'.
+ '?bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=ON_QA' .
+ '&amp;component=' . $name;
}
$summary['ViewVC'] = 'http://cvs.fedoraproject.org/viewvc/rpms/' .
$name . '/';