API: Added help text message that specifies whether a module is POST-only
authorRoan Kattouw <catrope@users.mediawiki.org>
Tue, 25 Mar 2008 15:47:23 +0000 (15:47 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Tue, 25 Mar 2008 15:47:23 +0000 (15:47 +0000)
RELEASE-NOTES
includes/api/ApiBase.php

index d38a5a5..7622dfe 100644 (file)
@@ -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 ===
 
index b92bd56..4295046 100644 (file)
@@ -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");
        }
 
        /**