Revert live hack from r36493, because it has no effect whatsoever.
authorRoan Kattouw <catrope@users.mediawiki.org>
Fri, 20 Jun 2008 10:51:17 +0000 (10:51 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Fri, 20 Jun 2008 10:51:17 +0000 (10:51 +0000)
$params['action'] cannot be an invalid action, because the $params array is filled by ApiBase::extractRequestParams() which checks whether the parameters are valid and throws an error message (ironically implemented with a UsageException) if they're not.

includes/api/ApiMain.php

index 84fc81f..b0096d0 100644 (file)
@@ -339,12 +339,7 @@ class ApiMain extends ApiBase {
 
                $this->mShowVersions = $params['version'];
                $this->mAction = $params['action'];
-               
-               # For debugging -- TS
-               if ( !isset( $this->mModules[$this->mAction] ) ) {
-                       throw new MWException( "Invalid action: {$this->mAction}" );
-               }
-               
+
                // Instantiate the module requested by the user
                $module = new $this->mModules[$this->mAction] ($this, $this->mAction);