"Tim Starling" changed the status of MediaWiki.r98004 to "ok" and commented it. URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/98004#c28666
Old Status: new > New Status: ok Commit summary for MediaWiki.r98004: SpecialMoodBarFeedback: Implement backwards paging * Move query result post-processing logic into doQuery() * Run the query backwards if &dir=prev is set, and set this on "Newer" links * Request 2 extra rows and drop the first and last ones in certain circumstances. This involves some voodoo to figure out whether there are previous/next rows. The values of those rows are NOT used: we always set the offset to the value of the first/last displayed row, so the next request will grab that row then drop it. * Use iterator_to_array( $rows, false ) because of a very weird issue I got where iterator_to_array() sometimes returns array( 1 => rowObj ). Passing false for the second parameter forces re-indexation * Return an array structure from doQuery() with the rows to display, the row with the data for the newer link, and the row with the data for the older link Tim Starling's comment: Backwards paging is tricky isn't it? I just wanted to plug IndexPager again ;) This really is the problem it was invented for. _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
