cvs: pearweb /public_html/bugs stats.php
| From: | Helgi �ormar �orbj�rnsson | Date: | Wed, 30 Jun 2004 00:38:48 +0000 |
| Subject: | cvs: pearweb /public_html/bugs stats.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-21285@lists.php.net to get a copy of this message | ||
dufuz Tue Jun 29 20:38:48 2004 EDT
Modified files:
/pearweb/public_html/bugs stats.php
Log:
packages link now /package/, Total entires was removed and replaced with Name (not sortable yet),
submit button for people that don't have JS.
http://cvs.php.net/diff.php/pearweb/public_html/bugs/stats.php?r1=1.18&r2=1.19&ty=u
Index: pearweb/public_html/bugs/stats.php
diff -u pearweb/public_html/bugs/stats.php:1.18 pearweb/public_html/bugs/stats.php:1.19
--- pearweb/public_html/bugs/stats.php:1.18 Tue Jun 29 19:06:03 2004
+++ pearweb/public_html/bugs/stats.php Tue Jun 29 20:38:48 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.18 2004/06/29 23:06:03 dufuz Exp $
+ * @version $Id: stats.php,v 1.19 2004/06/30 00:38:48 dufuz Exp $
*/
/**
@@ -44,6 +44,8 @@
break;
}
+$sql = '';
+$where = '';
if ($_GET['category'] && $_GET['category'] != '') {
!empty($_GET['developer']) ? $and = ' AND ' : '';
$where .= ' AND categories.name = ' .
$dbh->quoteSmart($_GET['category']) . $and;
@@ -56,11 +58,12 @@
}
+$where_clause = '';
if (empty($_GET['bug_type']) || $_GET['bug_type'] == 'All') {
$bug_type = '';
} else {
$bug_type = $_GET['bug_type'];
- $where_clause .= " AND bug_type = '" . escapeSQL($bug_type) .
"'";
+ $where_clause = " AND bug_type = '" . escapeSQL($bug_type) . "'";
}
$query = 'SELECT p.name FROM packages p '.$sql.$type.$where.' GROUP BY p.name';
@@ -74,6 +77,7 @@
$result[] = array('name' => 'PEPr');
}
}
+
foreach ($result as $package) {
$query = 'SELECT status, package_name
FROM bugdb
@@ -151,7 +155,7 @@
'Documentation',
'PEPr');
if (!in_array($name, $filter)) {
- return '<a href="/'.$name.'" style="color:
black;">'.$name.'</a>';
+ return '<a href="/package/'.$name.'" style="color:
black;">'.$name.'</a>';
} else {
return $name;
}
@@ -160,9 +164,8 @@
function display_stat_header($total, $grandtotal = true) {
global $dbh;
if ($grandtotal) {
- $entries =& $dbh->getOne('SELECT count(id) AS total FROM bugdb');
- $stat_head = '<tr id="bug_header"><td><strong
style="text-align: right;">Total bug entries in system:</strong></td>
- <td style="font-size: 120%;">'.$entries.'</td>';
+ $stat_head = '<tr
id="bug_header"><td><strong>Name</strong></td>
+ <td> </td>';
} else {
$stat_head = '<tr
id="bug_header"><td> </td><td> </td>';
}
@@ -216,6 +219,7 @@
echo '</select> <strong>Bug Type:</strong><select
id="bug_type" name="bug_type" onchange="this.form.submit(); return
false;">';
show_type_options($_GET['bug_type'], true);
echo '</select>
+ <input type="submit" name="submitStats" value="Search"
/>
</div>
</form></td></tr></table>' . "\n";
echo '<table style="width: 100%;">'."\n";