From: Reini U. <ru...@x-...> - 2004-02-21 19:26:36
|
electron schrieb: > This fixes the RecentChanges bug with ADODB. > > Comments out the limit settings lakka used, they are not needed. They are needed. Not now, but with future versions which support paging on which I'm currently working. Cannot you fix the wrong limit value if there's one? I cannot reproduce this bug on ADODB. > 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); > } > > > -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |