Index: trunk/phase3/includes/CategoryPage.php |
— | — | @@ -262,23 +262,23 @@ |
263 | 263 | $count = 0; |
264 | 264 | $this->nextPage = null; |
265 | 265 | |
266 | | - while ( $x = $dbr->fetchObject ( $res ) ) { |
| 266 | + foreach ( $res as $row ) { |
267 | 267 | if ( ++$count > $this->limit ) { |
268 | 268 | // We've reached the one extra which shows that there are |
269 | 269 | // additional pages to be had. Stop here... |
270 | | - $this->nextPage = $x->cl_sortkey; |
| 270 | + $this->nextPage = $row->cl_sortkey; |
271 | 271 | break; |
272 | 272 | } |
273 | 273 | |
274 | | - $title = Title::makeTitle( $x->page_namespace, $x->page_title ); |
| 274 | + $title = Title::newFromRow( $row ); |
275 | 275 | |
276 | 276 | if ( $title->getNamespace() == NS_CATEGORY ) { |
277 | | - $cat = Category::newFromRow( $x, $title ); |
278 | | - $this->addSubcategoryObject( $cat, $x->cl_sortkey, $x->page_len ); |
| 277 | + $cat = Category::newFromRow( $row, $title ); |
| 278 | + $this->addSubcategoryObject( $cat, $row->cl_sortkey, $row->page_len ); |
279 | 279 | } elseif ( $this->showGallery && $title->getNamespace() == NS_FILE ) { |
280 | | - $this->addImage( $title, $x->cl_sortkey, $x->page_len, $x->page_is_redirect ); |
| 280 | + $this->addImage( $title, $row->cl_sortkey, $row->page_len, $row->page_is_redirect ); |
281 | 281 | } else { |
282 | | - $this->addPage( $title, $x->cl_sortkey, $x->page_len, $x->page_is_redirect ); |
| 282 | + $this->addPage( $title, $row->cl_sortkey, $row->page_len, $row->page_is_redirect ); |
283 | 283 | } |
284 | 284 | } |
285 | 285 | |