Commit:    1cc2e658ae68ffabb2503ac6955b37abfe69e01f
Author:    Johannes Schlüter <[email protected]>         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')
                                '&amp;cve_id=' . urlencode($cve_id) .
                                "&amp;cve_id_not=$cve_id_not" .
                                '&amp;patch=' . urlencode($patch) .
+                               '&amp;pull=' . urlencode($pull) .
                                '&amp;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) {
 ?>


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to