cvs: php-bugs-web / search.php

From: Date: Sat, 24 May 2008 03:37:07 +0000
Subject: cvs: php-bugs-web / search.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-1807@lists.php.net to get a copy of this message
philip Sat May 24 03:37:07 2008 UTC Modified files: /php-bugs-web search.php Log: Pass in &count_only=1 if you only want the number of bugs that meet the search http://cvs.php.net/viewvc.cgi/php-bugs-web/search.php?r1=1.70&r2=1.71&diff_format=u Index: php-bugs-web/search.php diff -u php-bugs-web/search.php:1.70 php-bugs-web/search.php:1.71 --- php-bugs-web/search.php:1.70 Fri Oct 19 19:42:43 2007 +++ php-bugs-web/search.php Sat May 24 03:37:07 2008 @@ -13,6 +13,7 @@ $errors = array(); $warnings = array(); +$count_only = empty($_REQUEST['count_only']) ? false : true; $boolean = isset($_REQUEST['boolean']) ? (int) $_REQUEST['boolean'] : 1; define('BOOLEAN_SEARCH', $boolean); @@ -137,6 +138,12 @@ $errors[] = "No bugs with the specified criteria were found."; } else { + + // Sometimes people only want to know how many bugs meet the condition + if ($count_only) { + echo $total_rows; + exit; + } $bug_type_string = ''; if (count($bug_type) > 0) {

« previous php.webmaster (#1807) next »