cvs: pearweb /public_html/bugs search.php
| From: | Helgi �ormar �orbj�rnsson | Date: | Sat, 12 Jan 2008 17:04:33 +0000 |
| Subject: | cvs: pearweb /public_html/bugs search.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-50243@lists.php.net to get a copy of this message | ||
dufuz Sat Jan 12 17:04:33 2008 UTC
Modified files:
/pearweb/public_html/bugs search.php
Log:
We don't support anything below mysql 4.0 anymore
http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/search.php?r1=1.96&r2=1.97&diff_format=u
Index: pearweb/public_html/bugs/search.php
diff -u pearweb/public_html/bugs/search.php:1.96 pearweb/public_html/bugs/search.php:1.97
--- pearweb/public_html/bugs/search.php:1.96 Sat Jan 12 17:01:00 2008
+++ pearweb/public_html/bugs/search.php Sat Jan 12 17:04:33 2008
@@ -15,7 +15,7 @@
* @package Bugs
* @copyright Copyright (c) 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License
- * @version $Id: search.php,v 1.96 2008/01/12 17:01:00 dufuz Exp $
+ * @version $Id: search.php,v 1.97 2008/01/12 17:04:33 dufuz Exp $
*/
// Obtain common includes
@@ -74,19 +74,7 @@
$package_nname = (isset($_GET['package_nname']) &&
is_array($_GET['package_nname'])) ? $_GET['package_nname'] : array();
if (isset($_GET['cmd']) && $_GET['cmd'] == 'display') {
-
-/*
- * need to move this to DB eventually...
- */
- $mysql4 = false;
- if ($dbh->phptype == 'mysql') {
- $mysql4 = version_compare(mysql_get_server_info(), '4.0.0', 'ge');
- } else {
- $mysql4 = version_compare(mysqli_get_server_version($dbh->connection),
'4.0.0', 'ge');
-
- }
-
- $query = $mysql4 ? 'SELECT SQL_CALC_FOUND_ROWS' : 'SELECT';
+ $query = 'SELECT SQL_CALC_FOUND_ROWS';
$query .= ' bugdb.*, TO_DAYS(NOW())-TO_DAYS(bugdb.ts2) AS unchanged'
. ' FROM bugdb';
@@ -361,13 +349,7 @@
} else {
$res =& $dbh->query($query);
$rows = $res->numRows();
-
- if ($mysql4) {
- $total_rows =& $dbh->getOne('SELECT FOUND_ROWS()');
- } else {
- /* lame mysql 3 compatible attempt to allow browsing the search */
- $total_rows = $rows < 10 ? $rows : $begin + $rows + 10;
- }
+ $total_rows =& $dbh->getOne('SELECT FOUND_ROWS()');
$package_name_string = '';
if (count($package_name) > 0) {