dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use RevisionRenderer for rendering ParserOutput
[lhc/web/wiklou.git]
/
includes
/
page
/
ImagePage.php
diff --git
a/includes/page/ImagePage.php
b/includes/page/ImagePage.php
index
81677d4
..
d3d6da7
100644
(file)
--- a/
includes/page/ImagePage.php
+++ b/
includes/page/ImagePage.php
@@
-272,18
+272,20
@@
class ImagePage extends Article {
}
/**
}
/**
- * Overloading Article's get
ContentObjec
t method.
+ * Overloading Article's get
EmptyPageParserOutpu
t method.
*
* Omit noarticletext if sharedupload; text will be fetched from the
* shared upload server if possible.
*
* Omit noarticletext if sharedupload; text will be fetched from the
* shared upload server if possible.
- * @return string
+ *
+ * @param ParserOptions $options
+ * @return ParserOutput
*/
*/
- public function get
ContentObject(
) {
+ public function get
EmptyPageParserOutput( ParserOptions $options
) {
$this->loadFile();
if ( $this->mPage->getFile() && !$this->mPage->getFile()->isLocal() && 0 == $this->getId() ) {
$this->loadFile();
if ( $this->mPage->getFile() && !$this->mPage->getFile()->isLocal() && 0 == $this->getId() ) {
- return n
ull
;
+ return n
ew ParserOutput()
;
}
}
- return parent::get
ContentObject(
);
+ return parent::get
EmptyPageParserOutput( $options
);
}
private function getLanguageForRendering( WebRequest $request, File $file ) {
}
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(),
// in the mediawiki.page.image.pagination module
$link = Linker::linkKnown(
$this->getTitle(),
-
$label
,
+
htmlspecialchars( $label )
,
[],
[ 'page' => $page - 1 ]
);
[],
[ 'page' => $page - 1 ]
);
@@
-460,7
+462,7
@@
class ImagePage extends Article {
$label = $this->getContext()->msg( 'imgmultipagenext' )->text();
$link = Linker::linkKnown(
$this->getTitle(),
$label = $this->getContext()->msg( 'imgmultipagenext' )->text();
$link = Linker::linkKnown(
$this->getTitle(),
-
$label
,
+
htmlspecialchars( $label )
,
[],
[ 'page' => $page + 1 ]
);
[],
[ 'page' => $page + 1 ]
);