X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fapi%2FApiFormatXml.php;h=cc1bd820f0e21b2e1881ca211e1ff7ee0a507650;hb=7babd362babcbf7f20adb8e12edb4f4bc1d4249f;hp=be9b6d0b4b7dd6d17147aa5228a1eee771c32e67;hpb=f9d7d3b8561dab3ddfd8798a77a5b72e03ac8c2b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiFormatXml.php b/includes/api/ApiFormatXml.php index be9b6d0b4b..cc1bd820f0 100644 --- a/includes/api/ApiFormatXml.php +++ b/includes/api/ApiFormatXml.php @@ -1,9 +1,5 @@ @gmail.com" * * This program is free software; you can redistribute it and/or modify @@ -266,20 +262,20 @@ class ApiFormatXml extends ApiFormatBase { ); } - function addXslt() { + 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 ) { - $this->setWarning( 'Stylesheet should be in the MediaWiki namespace.' ); + $this->addWarning( 'apiwarn-invalidxmlstylesheetns' ); return; } if ( substr( $nt->getText(), -4 ) !== '.xsl' ) { - $this->setWarning( 'Stylesheet should have .xsl extension.' ); + $this->addWarning( 'apiwarn-invalidxmlstylesheetext' ); return; }