From: electron <ele...@mg...> - 2004-02-21 04:11:01
|
This fixes the RecentChanges bug with ADODB. Comments out the limit settings lakka used, they are not needed. -Jtp Index: lib/WikiDB/backend/ADODB.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend/ADODB.php,v retrieving revision 1.14 diff -u -r1.14 ADODB.php --- lib/WikiDB/backend/ADODB.php 17 Feb 2004 12:17:34 -0000 1.14 +++ lib/WikiDB/backend/ADODB.php 21 Feb 2004 03:49:14 -0000 @@ -337,7 +337,7 @@ $data['mtime'] = $mtime; $data['is_minor_edit'] = !empty($minor_edit); - + if (isset($content)) $data['%content'] = $content; elseif ($have_content) @@ -613,7 +613,7 @@ * Find recent changes. */ function most_recent($params) { - $limit = 0; + //$limit = 0; $since = 0; $include_minor_revisions = false; $exclude_major_revisions = false; @@ -626,7 +626,7 @@ $pick = array(); if ($since) $pick[] = "mtime >= $since"; - + if ($include_all_revisions) { // Include all revisions of each page. @@ -662,11 +662,11 @@ } } $order = "DESC"; - if($limit < 0){ + /*if($limit < 0){ $order = "ASC"; $limit = -$limit; } - $limit = $limit ? $limit : 1; + $limit = $limit ? $limit : 1;*/ $where_clause = $join_clause; if ($pick) $where_clause .= " AND " . join(" AND ", $pick); @@ -676,8 +676,8 @@ $result = $dbh->SelectLimit("SELECT $page_tbl.*,$version_tbl.*" . " FROM $table" . " WHERE $where_clause" - . " ORDER BY mtime $order", - $limit); + . " ORDER BY mtime $order" + ); return new WikiDB_backend_ADODB_iter($this, $result); } |