From: Roan Kattouw Date: Tue, 25 Mar 2008 15:47:23 +0000 (+0000) Subject: API: Added help text message that specifies whether a module is POST-only X-Git-Tag: 1.31.0-rc.0~48822 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=53b7bdb63fc84bd832746a5c44c8b7e39baf16a3;p=lhc%2Fweb%2Fwiklou.git API: Added help text message that specifies whether a module is POST-only --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d38a5a541d..7622dfe47a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -161,6 +161,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 13444) Add description to list=watchlist * (bug 13482) Disabled search types handled properly * Added inprop=talkid,subjectid to prop=info +* Added help text message that specifies whether a module is POST-only === Languages updated in 1.13 === diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index b92bd56adc..42950463b8 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -186,6 +186,9 @@ abstract class ApiBase { ); $msg = $lnPrfx . implode($lnPrfx, $msg) . "\n"; + if ($this->mustBePosted()) + $msg .= "\nThis module only accepts POST requests.\n"; + // Parameters $paramsMsg = $this->makeHelpMsgParameters(); if ($paramsMsg !== false) { @@ -640,7 +643,7 @@ abstract class ApiBase { * Internal code errors should be reported with this method */ protected static function dieDebug($method, $message) { - throw new MWException("Internal error in $method: $message"); + wfDebugDieBacktrace("Internal error in $method: $message"); } /**