cvs: pearweb /public_html/bugs stats.php
| From: | Helgi �ormar �orbj�rnsson | Date: | Tue, 29 Jun 2004 16:57:46 +0000 |
| Subject: | cvs: pearweb /public_html/bugs stats.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-21262@lists.php.net to get a copy of this message | ||
dufuz Tue Jun 29 12:57:46 2004 EDT
Modified files:
/pearweb/public_html/bugs stats.php
Log:
Now category/developer are in order links, packages now link to their info page.
Doc,Bug system, pepr, web site bugs aren't shown for all cats and devs.
http://cvs.php.net/diff.php/pearweb/public_html/bugs/stats.php?r1=1.15&r2=1.16&ty=u
Index: pearweb/public_html/bugs/stats.php
diff -u pearweb/public_html/bugs/stats.php:1.15 pearweb/public_html/bugs/stats.php:1.16
--- pearweb/public_html/bugs/stats.php:1.15 Sun Jun 27 17:22:47 2004
+++ pearweb/public_html/bugs/stats.php Tue Jun 29 12:57:46 2004
@@ -15,7 +15,7 @@
* @package Bugs
* @copyright Copyright (c) 1997-2004 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License
- * @version $Id: stats.php,v 1.15 2004/06/27 21:22:47 toby Exp $
+ * @version $Id: stats.php,v 1.16 2004/06/29 16:57:46 dufuz Exp $
*/
/**
@@ -23,9 +23,11 @@
*/
require_once './include/prepend.inc';
-
error_reporting(E_ALL ^ E_NOTICE);
+$category = $_GET['category'];
+$developer = $_GET['developer'];
+
$dbh->setFetchMode(DB_FETCHMODE_ASSOC);
response_header('Bugs Stat');
@@ -50,15 +52,19 @@
$where == '' ? $extra = 'WHERE ' : $extra = 'AND ';
switch ($site) {
case 'pear':
- $type = $extra.'packages.package_type = '.$dbh->quoteSmart('pear') .
'
- OR bugdb.package_name IN ('.$dbh->quoteSmart('Bug
System').','.$dbh->quoteSmart('Web Site').',
+ $type = $extra.'packages.package_type = '.$dbh->quoteSmart('pear');
+ if ($_GET['developer'] == '' &&
$_GET['category'] == '') {
+ $type .= 'OR bugdb.package_name IN
('.$dbh->quoteSmart('Bug System').','.$dbh->quoteSmart('Web
Site').',
'.$dbh->quoteSmart('Documentation').',
'.$dbh->quoteSmart('PEPr').')';
+ }
break;
case 'pecl':
- $type = $extra.'packages.package_type = '.$dbh->quoteSmart('pecl') .
'
- OR bugdb.package_name IN ('.$dbh->quoteSmart('Bug
System').','.$dbh->quoteSmart('Web Site').',
+ $type = $extra.'packages.package_type = '.$dbh->quoteSmart('pecl');
+ if ($_GET['developer'] == '' &&
$_GET['category'] == '') {
+ $type .= 'OR bugdb.package_name IN
('.$dbh->quoteSmart('Bug System').','.$dbh->quoteSmart('Web
Site').',
'.$dbh->quoteSmart('Documentation').')';
+ }
break;
default:
@@ -125,14 +131,27 @@
function sort_url ($name)
{
- global $sort_by,$rev,$phpver;
+ global $sort_by,$rev,$phpver,$category,$developer;
if ($type == $_GET['sort_by']) {
$reve = ($_GET['rev'] == 1) ? 0 : 1;
} else {
$reve = 1;
}
- return '<a
href="./stats.php?sort_by='.urlencode($name).'&rev='.$reve.'">'.ucfirst($name).'</a>';
+ return '<a
href="./stats.php?sort_by='.urlencode($name).'&rev='.$reve.'&category='.$category.'&developer='.$developer.'">'.ucfirst($name).'</a>';
+}
+
+function package_link ($name)
+{
+ $filter = array('Bug System',
+ 'Web Site',
+ 'Documentation',
+ 'PEPr');
+ if (!in_array($name, $filter)) {
+ return '<a href="/'.$name.'" style="color:
black;">'.$name.'</a>';
+ } else {
+ return $name;
+ }
}
/**
@@ -223,8 +242,8 @@
$package_name['feedback'][$name] > 0 ) && $name != 'all')
{
echo '<tr><td class="bug_head">
- <strong>' . $name . ':</strong></td>
- <td class="bug_bg1">'. $package_name['all'][$name]
.'</td>
+ <strong>' . package_link($name) . ':</strong></td>
+ <td class="bug_bg1">'. $package_name['all'][$name]
.'</td>
<td class="bug_bg2">'. bugstats('closed', $name)
.' </td>
<td class="bug_bg1">'. bugstats('open', $name)
.' </td>
<td class="bug_bg2">'. bugstats('critical', $name)
.' </td>