'import-unknownerror' => array( 'code' => 'import-unknownerror', 'info' => "Unknown error on import: ``\$1''" ),
'cantoverwrite-sharedfile' => array( 'code' => 'cantoverwrite-sharedfile', 'info' => 'The target file exists on a shared repository and you do not have permission to override it' ),
'sharedfile-exists' => array( 'code' => 'fileexists-sharedrepo-perm', 'info' => 'The target file exists on a shared repository. Use the ignorewarnings parameter to override it.' ),
+ 'mustbeposted' => array( 'code' => 'mustbeposted', 'info' => "The \$1 module requires a POST request" ),
// ApiEditPage messages
'noimageredirect-anon' => array( 'code' => 'noimageredirect-anon', 'info' => "Anonymous users can't create image redirects" ),
$ret = array( array( 'readrequired' ) );
if ( $this->mustBePosted() ) {
- $ret = array_merge( $ret, array( array( 'code' => 'mustbeposted', 'info' => 'The {$this->mAction} module requires a POST request' ) ) );
+ $ret = array_merge( $ret, array( array ('mustbeposted', $this->mModuleName ) ) );
}
-
+
return $ret;
}
if ( !$this->mInternalMode ) {
// Ignore mustBePosted() for internal calls
if ( $module->mustBePosted() && !$this->mRequest->wasPosted() )
- $this->dieUsage( "The {$this->mAction} module requires a POST request", 'mustbeposted' );
+ $this->dieUsageMsg( array ('mustbeposted', $this->mAction ) );
// See if custom printer is used
$this->mPrinter = $module->getCustomPrinter();