com web/bugs: Add search suppot or bugs with pull requets: include/query.php www/index.php www/search.php
| From: | Johannes Schlüter | Date: | Fri, 08 Feb 2013 03:53:22 +0000 |
| Subject: | com web/bugs: Add search suppot or bugs with pull requets: include/query.php www/index.php www/search.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-15471@lists.php.net to get a copy of this message | ||
Commit: 1cc2e658ae68ffabb2503ac6955b37abfe69e01f
Author: Johannes Schlüter <johannes@schlueters.de> Fri, 8 Feb 2013 04:53:22 +0100
Parents: da44efe24b8d24ab02b0d6b8043500bbc725714b
Branches: master
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=1cc2e658ae68ffabb2503ac6955b37abfe69e01f
Log:
Add search suppot or bugs with pull requets
Searching for bugs with patch OR pull request currently isn't
possible, aöö searches use AND.
Changed paths:
M include/query.php
M www/index.php
M www/search.php
Diff:
diff --git a/include/query.php b/include/query.php
index 783a6fc..40455b2 100644
--- a/include/query.php
+++ b/include/query.php
@@ -35,6 +35,7 @@ $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'] : '';
+$pull = !empty($_GET['pull']) ? $_GET['pull'] : '';
$private = !empty($_GET['private']) ? $_GET['private'] : '';
$begin = (int) ((!empty($_GET['begin']) && $_GET['begin'] > 0) ?
$_GET['begin'] : 0);
$limit = (defined('MAX_BUGS_RETURN')) ? MAX_BUGS_RETURN : 30;
@@ -179,6 +180,10 @@ if (isset($_GET['cmd']) && $_GET['cmd'] ==
'display')
$where_clause .= " AND EXISTS (SELECT 1 FROM bugdb_patchtracker WHERE bugdb_id = bugdb.id
LIMIT 1)";
}
+ if ($pull != '') {
+ $where_clause .= " AND EXISTS (SELECT 1 FROM bugdb_github WHERE bugdb_id = bugdb.id LIMIT
1)";
+ }
+
if ($assign != '') {
$where_clause .= ' AND bugdb.assign = ' . $dbh->quote($assign);
}
diff --git a/www/index.php b/www/index.php
index 4219ce0..de7f9f3 100644
--- a/www/index.php
+++ b/www/index.php
@@ -99,6 +99,10 @@ to a random open bug.</p>
'base' => $base_default,
'suffix' => '&bug_type=All&patch=Y',
),
+ 'Most recent open bugs (all) with pull request' => array(
+ 'base' => $base_default,
+ 'suffix' => '&bug_type=All&pull=YY',
+ ),
'Most recent open bugs (PHP 5.3)' => array(
'base' => $base_default,
'suffix' => '&bug_type=All&phpver=5.3',
diff --git a/www/search.php b/www/search.php
index 2d09eb1..0eafc33 100644
--- a/www/search.php
+++ b/www/search.php
@@ -76,6 +76,7 @@ if (isset($_GET['cmd']) && $_GET['cmd'] ==
'display')
'&cve_id=' . urlencode($cve_id) .
"&cve_id_not=$cve_id_not" .
'&patch=' . urlencode($patch) .
+ '&pull=' . urlencode($pull) .
'&assign=' . urlencode($assign);
if ($is_security_developer) {
@@ -315,6 +316,11 @@ display_bug_error($warnings, 'warnings', 'WARNING:');
<td style="white-space: nowrap">Return only bugs reported with <b>patch
attached</b></td>
<td><input type="checkbox" name="patch" value="Y" <?php
echo $patch == 'Y' ? " checked" : "" ?> /></td>
</tr>
+<tr valign="top">
+ <th>Pull Request</th>
+ <td style="white-space: nowrap">Return only bugs with a <b>pull
request</b></td>
+ <td><input type="checkbox" name="pull" value="Y" <?php
echo $pull == 'Y' ? " checked" : "" ?> /></td>
+</tr>
<?php
if ($is_security_developer) {
?>