From 8f416baead93a48e5799e44b8bd2e2c4859f4e04 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 14 Sep 2007 13:18:58 +0200 Subject: auf Version 1.11 aktualisiert; Login-Bug behoben --- includes/ImageQueryPage.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'includes/ImageQueryPage.php') diff --git a/includes/ImageQueryPage.php b/includes/ImageQueryPage.php index 93f090a1..8948ddc6 100644 --- a/includes/ImageQueryPage.php +++ b/includes/ImageQueryPage.php @@ -30,8 +30,8 @@ class ImageQueryPage extends QueryPage { # $num [should update this to use a Pager] for( $i = 0; $i < $num && $row = $dbr->fetchObject( $res ); $i++ ) { $image = $this->prepareImage( $row ); - if( $image instanceof Image ) { - $gallery->add( $image, $this->getCellHtml( $row ) ); + if( $image ) { + $gallery->add( $image->getTitle(), $this->getCellHtml( $row ) ); } } @@ -49,7 +49,7 @@ class ImageQueryPage extends QueryPage { $namespace = isset( $row->namespace ) ? $row->namespace : NS_IMAGE; $title = Title::makeTitleSafe( $namespace, $row->title ); return ( $title instanceof Title && $title->getNamespace() == NS_IMAGE ) - ? new Image( $title ) + ? wfFindFile( $title ) : null; } @@ -65,4 +65,4 @@ class ImageQueryPage extends QueryPage { } -?> + -- cgit v1.2.2