X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fapi%2FApiStashEdit.php;h=3c02c9ce631a974fb59302b25f21b4700b94ea5a;hp=d8562b0d331118b7a4cec96d8bc13fbb0bc0dac0;hb=e3bd13db0c285f312e31bb1b7271af4628cca80c;hpb=2a1fcd27c19913394c179cbe8be1a9e981d7f81b diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index d8562b0d33..3c02c9ce63 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -50,7 +50,7 @@ class ApiStashEdit extends ApiBase { if ( !ContentHandler::getForModelID( $params['contentmodel'] ) ->isSupportedFormat( $params['contentformat'] ) ) { - $this->dieUsage( "Unsupported content model/format", 'badmodelformat' ); + $this->dieUsage( 'Unsupported content model/format', 'badmodelformat' ); } // Trim and fix newlines so the key SHA1's match (see RequestContext::getText()) @@ -77,7 +77,7 @@ class ApiStashEdit extends ApiBase { $baseRev->getId() ); if ( !$editContent ) { - $this->dieUsage( "Could not merge updated section.", 'replacefailed' ); + $this->dieUsage( 'Could not merge updated section.', 'replacefailed' ); } if ( $currentRev->getId() == $baseRev->getId() ) { // Base revision was still the latest; nothing to merge @@ -433,19 +433,19 @@ class ApiStashEdit extends ApiBase { ]; } - function needsToken() { + public function needsToken() { return 'csrf'; } - function mustBePosted() { + public function mustBePosted() { return true; } - function isWriteMode() { + public function isWriteMode() { return true; } - function isInternal() { + public function isInternal() { return true; } }