svn: /web/php-bugs/trunk/ include/query.php www/search.php
| From: | Felipe Pena | Date: | Sun, 12 Dec 2010 17:06:00 +0000 |
| Subject: | svn: /web/php-bugs/trunk/ include/query.php www/search.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-9693@lists.php.net to get a copy of this message | ||
felipe Sun, 12 Dec 2010 17:06:00 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=306268
Log:
- Added NOT option to CVE-ID bug search
Changed paths:
U web/php-bugs/trunk/include/query.php
U web/php-bugs/trunk/www/search.php
Modified: web/php-bugs/trunk/include/query.php
===================================================================
--- web/php-bugs/trunk/include/query.php 2010-12-12 16:48:02 UTC (rev 306267)
+++ web/php-bugs/trunk/include/query.php 2010-12-12 17:06:00 UTC (rev 306268)
@@ -32,6 +32,7 @@
$php_os_not = !empty($_GET['php_os_not']) ? 'not' : '';
$phpver = !empty($_GET['phpver']) ? $_GET['phpver'] : '';
$cve_id = !empty($_GET['cve_id']) ? $_GET['cve_id'] : '';
+$cve_id_not = !empty($_GET['cve_id_not']) ? 'not' : '';
$patch = !empty($_GET['patch']) ? $_GET['patch'] : '';
$begin = (int) (!empty($_GET['begin']) ? $_GET['begin'] : 0);
$limit = (defined('MAX_BUGS_RETURN')) ? MAX_BUGS_RETURN : 30;
@@ -63,7 +64,7 @@
$where_clause = ' WHERE 1 = 1 ';
- if (!$is_security_developer) {
+ if ($user_flags & (BUGS_SECURITY_DEV | BUGS_TRUSTED_DEV)) {
/* Non trusted developer should see the Security related bug report just when it is public */
$where_clause .= ' AND (bugdb.bug_type <> "Security" OR private =
"N") ';
}
@@ -160,7 +161,7 @@
}
if ($cve_id != '') {
- $where_clause .= " AND bugdb.cve_id LIKE '" . $dbh->escape($cve_id) .
"%'";
+ $where_clause .= " AND bugdb.cve_id {$cve_id_not} LIKE '" .
$dbh->escape($cve_id) . "%'";
}
if ($patch != '') {
Modified: web/php-bugs/trunk/www/search.php
===================================================================
--- web/php-bugs/trunk/www/search.php 2010-12-12 16:48:02 UTC (rev 306267)
+++ web/php-bugs/trunk/www/search.php 2010-12-12 17:06:00 UTC (rev 306268)
@@ -13,7 +13,6 @@
$count_only = isset($_REQUEST['count_only']) &&
$_REQUEST['count_only'];
bugs_authenticate($user, $pw, $logged_in, $user_flags);
-$is_security_developer = ($user_flags & BUGS_SECURITY_DEV);
$newrequest = http_build_query(array_merge($_GET, $_POST));
@@ -69,6 +68,7 @@
"&limit=$limit" .
'&phpver=' . urlencode($phpver) .
'&cve_id=' . urlencode($cve_id) .
+ "&cve_id_not=$cve_id_not" .
"&patch=$patch" .
'&assign=' . urlencode($assign);
@@ -253,7 +253,10 @@
<tr valign="top">
<th>CVE-ID</th>
<td style="white-space: nowrap">Return bugs reported with
<b>CVE-ID</b></td>
- <td><input type="text" name="cve_id" value="<?php echo
htmlspecialchars($cve_id, ENT_COMPAT, 'UTF-8'); ?>" /></td>
+ <td>
+ <input type="text" name="cve_id" value="<?php echo
htmlspecialchars($cve_id, ENT_COMPAT, 'UTF-8'); ?>" />
+ <input style="vertical-align:middle;" type="checkbox"
name="cve_id_not" value="1" <?php echo ($cve_id_not == 'not') ?
'checked="checked"' : ''; ?> /> NOT
+ </td>
</tr>
<tr valign="top">