X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FImagePage.php;h=23bbc0172b0e4569515669fc878c5083772df766;hb=a7e28d201191e7ca8a51d10140f3f84c266b197d;hp=63e9894d7322fc5bf09557b8fb244ce4a5d1c753;hpb=500a1401d224455b562fbafd08d63b13023824e3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 63e9894d73..23bbc0172b 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -157,8 +157,10 @@ class ImagePage extends Article { $out->addHTML( Xml::openElement( 'div', array( 'id' => 'mw-imagepage-content', 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir(), 'class' => 'mw-content-'.$pageLang->getDir() ) ) ); - parent::view(); - $out->addHTML( Xml::closeElement( 'div' ) ); + + parent::view(); #FIXME: use ContentHandler::makeArticle() !! + + $wgOut->addHTML( Xml::closeElement( 'div' ) ); } else { # Just need to set the right headers $out->setArticleFlag( true ); @@ -268,20 +270,20 @@ class ImagePage extends Article { return $r; } - /** - * Overloading Article's getContent method. - * - * Omit noarticletext if sharedupload; text will be fetched from the - * shared upload server if possible. - * @return string - */ - public function getContent() { - $this->loadFile(); - if ( $this->mPage->getFile() && !$this->mPage->getFile()->isLocal() && 0 == $this->getID() ) { - return ''; - } - return parent::getContent(); - } + /** + * Overloading Article's getContentObject method. + * + * Omit noarticletext if sharedupload; text will be fetched from the + * shared upload server if possible. + * @return string + */ + public function getContentObject() { + $this->loadFile(); + if ( $this->mPage->getFile() && !$this->mPage->getFile()->isLocal() && 0 == $this->getID() ) { + return null; + } + return parent::getContentObject(); + } protected function openShowImage() { global $wgImageLimits, $wgEnableUploads, $wgSend404Code; @@ -990,7 +992,7 @@ class ImageHistoryList extends ContextSource { $img = $iscur ? $file->getName() : $file->getArchiveName(); $userId = $file->getUser( 'id' ); $userText = $file->getUser( 'text' ); - $description = $file->getDescription(); + $description = $file->getDescription( File::FOR_THIS_USER, $user ); $local = $this->current->isLocal(); $row = $selected = '';