cvs: pearweb /public_html/bugs search.php
| From: | Helgi �ormar �orbj�rnsson | Date: | Sun, 22 Apr 2007 02:54:18 +0000 |
| Subject: | cvs: pearweb /public_html/bugs search.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-46087@lists.php.net to get a copy of this message | ||
dufuz Sun Apr 22 02:54:18 2007 UTC
Modified files:
/pearweb/public_html/bugs search.php
Log:
Partially fix Request #10669 "Bugs reported by me" feature
- Now we can also search by the reports handle as well as the email
- Added a set to [username-here] button in the search UI
# This might be the full fix, depends on what Tim was talking about
http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/search.php?r1=1.76&r2=1.77&diff_format=u
Index: pearweb/public_html/bugs/search.php
diff -u pearweb/public_html/bugs/search.php:1.76 pearweb/public_html/bugs/search.php:1.77
--- pearweb/public_html/bugs/search.php:1.76 Sat Dec 23 19:50:51 2006
+++ pearweb/public_html/bugs/search.php Sun Apr 22 02:54:18 2007
@@ -15,7 +15,7 @@
* @package Bugs
* @copyright Copyright (c) 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License
- * @version $Id: search.php,v 1.76 2006/12/23 19:50:51 cellog Exp $
+ * @version $Id: search.php,v 1.77 2007/04/22 02:54:18 dufuz Exp $
*/
/**
@@ -72,7 +72,7 @@
$mysql4 = version_compare(mysql_get_server_info(), '4.0.0', 'ge');
} else {
$mysql4 = version_compare(mysqli_get_server_version($dbh->connection),
'4.0.0', 'ge');
-
+
}
if ($mysql4) {
@@ -272,8 +272,9 @@
$author_email = '';
} else {
$author_email = $_GET['author_email'];
- $where_clause .= ' AND bugdb.email = '
- . $dbh->quoteSmart($author_email);
+ $qae = $dbh->quoteSmart($author_email);
+ $where_clause .= ' AND (bugdb.email = '
+ . $qae . ' OR bugdb.handle=' . $qae . ')';
}
$where_clause .= ' AND (packages.package_type = '
@@ -325,7 +326,7 @@
}
$query .= ' ORDER BY ' . $order_by . ' ' . $direction;
-
+
// if status Feedback then sort also after last updated time.
if ($status == 'Feedback') {
$query .= ', bugdb.ts2 ' . $direction;
@@ -557,8 +558,15 @@
</tr>
<tr valign="top">
<th>Author e<span class="accesskey">m</span>ail</th>
- <td style="white-space: nowrap">Return bugs with author email</td>
- <td><input accesskey="m" type="text" name="author_email"
value="<?php echo clean($author_email); ?>" /></td>
+ <td style="white-space: nowrap">Return bugs with author email/handle</td>
+ <td><input accesskey="m" type="text" name="author_email"
value="<?php echo clean($author_email); ?>" />
+<?php
+ if ($auth_user) {
+ $u = rinse(htmlspecialchars($_REQUEST['PEAR_USER']));
+ print "<input type=\"button\" value=\"set to $u\"
onclick=\"form.author_email.value='$u'\" />";
+ }
+?>
+ </td>
</tr>
<tr valign="top">
<th>Date</th>