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
Warn if stateful ParserOutput transforms are used
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiFormatXml.php
diff --git
a/includes/api/ApiFormatXml.php
b/includes/api/ApiFormatXml.php
index
a45dbeb
..
e4dfda0
100644
(file)
--- a/
includes/api/ApiFormatXml.php
+++ b/
includes/api/ApiFormatXml.php
@@
-269,17
+269,17
@@
class ApiFormatXml extends ApiFormatBase {
protected function addXslt() {
$nt = Title::newFromText( $this->mXslt );
if ( is_null( $nt ) || !$nt->exists() ) {
protected function addXslt() {
$nt = Title::newFromText( $this->mXslt );
if ( is_null( $nt ) || !$nt->exists() ) {
- $this->
setWarning( 'Invalid or non-existent stylesheet specified
' );
+ $this->
addWarning( 'apiwarn-invalidxmlstylesheet
' );
return;
}
if ( $nt->getNamespace() != NS_MEDIAWIKI ) {
return;
}
if ( $nt->getNamespace() != NS_MEDIAWIKI ) {
- $this->
setWarning( 'Stylesheet should be in the MediaWiki namespace.
' );
+ $this->
addWarning( 'apiwarn-invalidxmlstylesheetns
' );
return;
}
if ( substr( $nt->getText(), -4 ) !== '.xsl' ) {
return;
}
if ( substr( $nt->getText(), -4 ) !== '.xsl' ) {
- $this->
setWarning( 'Stylesheet should have .xsl extension.
' );
+ $this->
addWarning( 'apiwarn-invalidxmlstylesheetext
' );
return;
}
return;
}