svn: /web/php-bugs/trunk/ include/query.php www/search.php

From: Date: Sun, 12 Dec 2010 21:40:17 +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-9701@lists.php.net to get a copy of this message
felipe Sun, 12 Dec 2010 21:40:17 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=306296 Log: - Added option to search for bugs marked as private 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 21:30:29 UTC (rev 306295) +++ web/php-bugs/trunk/include/query.php 2010-12-12 21:40:17 UTC (rev 306296) @@ -34,6 +34,7 @@ $cve_id = !empty($_GET['cve_id']) ? $_GET['cve_id'] : ''; $cve_id_not = !empty($_GET['cve_id_not']) ? 'not' : ''; $patch = !empty($_GET['patch']) ? $_GET['patch'] : ''; +$private = !empty($_GET['private']) ? $_GET['private'] : ''; $begin = (int) (!empty($_GET['begin']) ? $_GET['begin'] : 0); $limit = (defined('MAX_BUGS_RETURN')) ? MAX_BUGS_RETURN : 30; if (!empty($_GET['limit'])) { @@ -64,7 +65,11 @@ $where_clause = ' WHERE 1 = 1 '; - if (!($user_flags & (BUGS_SECURITY_DEV | BUGS_TRUSTED_DEV))) { + if ($user_flags & (BUGS_SECURITY_DEV | BUGS_TRUSTED_DEV)) { + if ($private != '') { + $where_clause .= ' AND bugdb.private = "Y" '; + } + } else { /* 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") '; } Modified: web/php-bugs/trunk/www/search.php =================================================================== --- web/php-bugs/trunk/www/search.php 2010-12-12 21:30:29 UTC (rev 306295) +++ web/php-bugs/trunk/www/search.php 2010-12-12 21:40:17 UTC (rev 306296) @@ -14,6 +14,8 @@ bugs_authenticate($user, $pw, $logged_in, $user_flags); +$is_security_developer = ($user_flags & (BUGS_TRUSTED_DEV | BUGS_SECURITY_DEV)); + $newrequest = http_build_query(array_merge($_GET, $_POST)); if (!$count_only) { @@ -296,8 +298,17 @@ <tr valign="top"> <th>Patch</th> <td style="white-space: nowrap">Return only bugs reported with <b>patch attached</b></td> - <td><input type="checkbox" name="patch" value="S" <?php echo $patch == 'S' ? " checked" : "" ?> /></td> + <td><input type="checkbox" name="patch" value="Y" <?php echo $patch == 'Y' ? " checked" : "" ?> /></td> </tr> +<?php + if ($is_security_developer) { +?> +<tr valign="top"> + <th>Private</th> + <td style="white-space: nowrap">Return only bugs marked as <b>private</b></td> + <td><input type="checkbox" name="private" value="Y" <?php echo $private == 'Y' ? " checked" : "" ?> /></td> +</tr> +<?php } ?> </table> </form>

« previous php.webmaster (#9701) next »