cvs: php-bugs-web /rss search.php

From: Date: Mon, 07 Aug 2006 21:23:27 +0000
Subject: cvs: php-bugs-web /rss search.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-32098@lists.php.net to get a copy of this message
philip Mon Aug 7 21:23:27 2006 UTC Modified files: /php-bugs-web/rss search.php Log: Raised the returned bugs max from 100 to 150 (so doc.php.net will show all open doc bugs) http://cvs.php.net/viewvc.cgi/php-bugs-web/rss/search.php?r1=1.3&r2=1.4&diff_format=u Index: php-bugs-web/rss/search.php diff -u php-bugs-web/rss/search.php:1.3 php-bugs-web/rss/search.php:1.4 --- php-bugs-web/rss/search.php:1.3 Wed Sep 1 17:07:49 2004 +++ php-bugs-web/rss/search.php Mon Aug 7 21:23:26 2006 @@ -12,6 +12,9 @@ * Sara Golemon <pollita@php.net> */ +/* Maximum number of bugs to return */ +define ('MAX_BUGS_RETURN', 150); + /* For format_search_string() */ require_once('functions.inc'); @@ -129,7 +132,7 @@ if (mysql_num_rows($res) > 0) { $i = 0; - while (($row = mysql_fetch_assoc($res)) && ($i++ < 100)) { + while (($row = mysql_fetch_assoc($res)) && ($i++ < MAX_BUGS_RETURN)) { echo " <rdf:li rdf:resource=\"http://bugs.php.net/{$row['id']}\" />\n"; } mysql_data_seek($res, 0); @@ -162,8 +165,8 @@ echo ' <dc:creator>' . utf8_encode(htmlspecialchars($row['email'])) . "</dc:creator>\n"; echo ' <dc:subject>' . utf8_encode(htmlspecialchars($row['bug_type'])) . "</dc:subject>\n"; echo " </item>\n"; - if ($i >= 100) { - $warnings[] = "Your query was too general, only the first 100 results were returned."; + if ($i >= MAX_BUGS_RETURN) { + $warnings[] = 'Your query was too general, only the first '. MAX_BUGS_RETURN .' results were returned.'; break; } }

« previous php.mirrors (#32098) next »