From: Matthias Mullie Date: Mon, 3 Jun 2013 18:23:16 +0000 (+0200) Subject: invalidparammix/missingparam get the module prefix twice X-Git-Tag: 1.31.0-rc.0~19509 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=52ecc8d9b50d7901fe6d4ab2f9bf2575c1e6111f;p=lhc%2Fweb%2Fwiklou.git invalidparammix/missingparam get the module prefix twice dieUsage will call encodeParamName, which will already prefix the error code with the module prefix E.g. for ApiViewFeedbackArticleFeedbackv5 (prefix afvf), this error code was (incorrectly): afvfafvfinvalidparammix. Should be: afvfinvalidparammix Change-Id: Ia351678b49e96ef58dce773331ebe9a1b3ebf824 --- diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index c8b05e84de..fdf3b7666b 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -688,9 +688,9 @@ abstract class ApiBase extends ContextSource { array( $this, "parameterNotEmpty" ) ) ), $required ); if ( count( $intersection ) > 1 ) { - $this->dieUsage( "The parameters {$p}" . implode( ", {$p}", $intersection ) . ' can not be used together', "{$p}invalidparammix" ); + $this->dieUsage( "The parameters {$p}" . implode( ", {$p}", $intersection ) . ' can not be used together', 'invalidparammix' ); } elseif ( count( $intersection ) == 0 ) { - $this->dieUsage( "One of the parameters {$p}" . implode( ", {$p}", $required ) . ' is required', "{$p}missingparam" ); + $this->dieUsage( "One of the parameters {$p}" . implode( ", {$p}", $required ) . ' is required', 'missingparam' ); } } @@ -724,7 +724,7 @@ abstract class ApiBase extends ContextSource { array( $this, "parameterNotEmpty" ) ) ), $required ); if ( count( $intersection ) > 1 ) { - $this->dieUsage( "The parameters {$p}" . implode( ", {$p}", $intersection ) . ' can not be used together', "{$p}invalidparammix" ); + $this->dieUsage( "The parameters {$p}" . implode( ", {$p}", $intersection ) . ' can not be used together', 'invalidparammix' ); } }