Index: trunk/phase3/includes/ImageQueryPage.php |
— | — | @@ -28,16 +28,17 @@ |
29 | 29 | # $res might contain the whole 1,000 rows, so we read up to |
30 | 30 | # $num [should update this to use a Pager] |
31 | 31 | for( $i = 0; $i < $num && $row = $dbr->fetchObject( $res ); $i++ ) { |
32 | | - $image = $this->prepareImage( $row ); |
33 | | - if( $image ) { |
34 | | - $gallery->add( $image->getTitle(), $this->getCellHtml( $row ) ); |
| 32 | + $namespace = isset( $row->namespace ) ? $row->namespace : NS_FILE; |
| 33 | + $title = Title::makeTitleSafe( $namespace, $row->title ); |
| 34 | + if ( $title instanceof Title && $title->getNamespace() == NS_FILE ) { |
| 35 | + $gallery->add( $title, $this->getCellHtml( $row ) ); |
35 | 36 | } |
36 | 37 | } |
37 | 38 | |
38 | 39 | $out->addHTML( $gallery->toHtml() ); |
39 | 40 | } |
40 | 41 | } |
41 | | - |
| 42 | + |
42 | 43 | // Gotta override this since it's abstract |
43 | 44 | function formatResult( $skin, $result ) { } |
44 | 45 | |