begin cleanup on magnus' url upload thingy
[lhc/web/wiklou.git] / includes / CategoryPage.php
index 93f5d71..440f41c 100644 (file)
@@ -83,7 +83,7 @@ class CategoryPage extends Article {
                $limit = $wgCategoryPagingLimit;
                $res = $dbr->select(
                        array( 'page', 'categorylinks' ),
-                       array( 'page_title', 'page_namespace', 'page_is_redirect', 'page_len', 'cl_sortkey' ),
+                       array( 'page_title', 'page_namespace', 'page_len', 'cl_sortkey' ),
                        array( $pageCondition,
                               'cl_from          =  page_id',
                               'cl_to'           => $this->mTitle->getDBKey()),
@@ -124,11 +124,13 @@ class CategoryPage extends Article {
                                array_push( $children_start_char, $wgContLang->convert( $sortkey ) ) ;
                        } elseif( $showGallery && $title->getNamespace() == NS_IMAGE ) {
                                // Show thumbnails of categorized images, in a separate chunk
+                               $anImage = new Image($title);
                                if( $flip ) {
-                                       $ig->insert( Image::newFromTitle( $title ) );
+                                       $ig->insert( $anImage );
                                } else {
-                                       $ig->add( Image::newFromTitle( $title ) );
+                                       $ig->add( $anImage );
                                }
+                               unset($anImage);
                        } else {
                                // Page in this category
                                array_push( $articles, $sk->makeSizeLinkObj( $x->page_len, $title, $wgContLang->convert( $title->getPrefixedText() ) ) ) ;