Merge "Add CollationFa"
[lhc/web/wiklou.git] / includes / api / ApiQuery.php
index 16bd725..8196cfa 100644 (file)
@@ -310,7 +310,7 @@ class ApiQuery extends ApiBase {
                                        ApiBase::dieDebug( __METHOD__, 'Error instantiating module' );
                                }
                                if ( !$wasPosted && $instance->mustBePosted() ) {
-                                       $this->dieUsageMsgOrDebug( [ 'mustbeposted', $moduleName ] );
+                                       $this->dieWithErrorOrDebug( [ 'apierror-mustbeposted', $moduleName ] );
                                }
                                // Ignore duplicates. TODO 2.0: die()?
                                if ( !array_key_exists( $moduleName, $modules ) ) {
@@ -415,11 +415,7 @@ class ApiQuery extends ApiBase {
                }
 
                if ( !$fit ) {
-                       $this->dieUsage(
-                               'The value of $wgAPIMaxResultSize on this wiki is ' .
-                                       'too small to hold basic result information',
-                               'badconfig'
-                       );
+                       $this->dieWithError( 'apierror-badconfig-resulttoosmall', 'badconfig' );
                }
 
                if ( $this->mParams['export'] ) {