* (bug 3506) Avoid MySQL error when Listusers returns no results
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 20 Sep 2005 01:02:51 +0000 (01:02 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 20 Sep 2005 01:02:51 +0000 (01:02 +0000)
Bug introduced in SpecialListusers.php rev 1.36:
http://cvs.sourceforge.net/viewcvs.py/wikipedia/phase3/includes/SpecialListusers.php?r1=1.35&r2=1.36

RELEASE-NOTES
includes/SpecialListusers.php

index a8664b1..72bc19d 100644 (file)
@@ -117,6 +117,7 @@ fully support the editing toolbar, but was found to be too confusing.
 * (bug 2570) Add 'watch this page' checkbox on uploads, watch uploads
   by default when 'watchdefault' option is on
 * Skip update of disused 'rc_cur_time' field (todo: discard the field)
+* (bug 3506) Avoid MySQL error when Listusers returns no results
 
 
 === Caveats ===
index dabe6fb..fc664e0 100644 (file)
@@ -66,7 +66,10 @@ class ListUsersPage extends QueryPage {
                $batch->execute( $wgLinkCache );
 
                // Back to start for display
-               $db->dataSeek( $res, 0 );
+               if( $db->numRows( $res ) > 0 ) {
+                       // If there are no rows we get an error seeking.
+                       $db->dataSeek( $res, 0 );
+               }
        }
 
        /**