X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fpage%2FImagePage.php;h=d3d6da79350d8e5d431c5b061f79232fb3bc62cd;hp=81677d41ceae426cd7a9ffd4f5323d7c55522a73;hb=1dee28cb5f1efd6d9e14d6cc1d0c73c3f69269b4;hpb=708f51c2c60b970549f463776faa38318fd11d21 diff --git a/includes/page/ImagePage.php b/includes/page/ImagePage.php index 81677d41ce..d3d6da7935 100644 --- a/includes/page/ImagePage.php +++ b/includes/page/ImagePage.php @@ -272,18 +272,20 @@ class ImagePage extends Article { } /** - * Overloading Article's getContentObject method. + * Overloading Article's getEmptyPageParserOutput method. * * Omit noarticletext if sharedupload; text will be fetched from the * shared upload server if possible. - * @return string + * + * @param ParserOptions $options + * @return ParserOutput */ - public function getContentObject() { + public function getEmptyPageParserOutput( ParserOptions $options ) { $this->loadFile(); if ( $this->mPage->getFile() && !$this->mPage->getFile()->isLocal() && 0 == $this->getId() ) { - return null; + return new ParserOutput(); } - return parent::getContentObject(); + return parent::getEmptyPageParserOutput( $options ); } private function getLanguageForRendering( WebRequest $request, File $file ) { @@ -440,7 +442,7 @@ class ImagePage extends Article { // in the mediawiki.page.image.pagination module $link = Linker::linkKnown( $this->getTitle(), - $label, + htmlspecialchars( $label ), [], [ 'page' => $page - 1 ] ); @@ -460,7 +462,7 @@ class ImagePage extends Article { $label = $this->getContext()->msg( 'imgmultipagenext' )->text(); $link = Linker::linkKnown( $this->getTitle(), - $label, + htmlspecialchars( $label ), [], [ 'page' => $page + 1 ] );