Index: trunk/phase3/includes/specials/SpecialDisambiguations.php |
— | — | @@ -108,17 +108,17 @@ |
109 | 109 | * @param $res |
110 | 110 | */ |
111 | 111 | function preprocessResults( $db, $res ) { |
| 112 | + if ( !$res->numRows() ) { |
| 113 | + return; |
| 114 | + } |
| 115 | + |
112 | 116 | $batch = new LinkBatch; |
113 | 117 | foreach ( $res as $row ) { |
114 | 118 | $batch->add( $row->namespace, $row->title ); |
115 | 119 | } |
116 | 120 | $batch->execute(); |
117 | 121 | |
118 | | - // Back to start for display |
119 | | - if ( $db->numRows( $res ) > 0 ) { |
120 | | - // If there are no rows we get an error seeking. |
121 | | - $db->dataSeek( $res, 0 ); |
122 | | - } |
| 122 | + $res->seek( 0 ); |
123 | 123 | } |
124 | 124 | |
125 | 125 | function formatResult( $skin, $result ) { |