Wikia code/includes/api/ApiMain.php

--- D:\Programming\SVN\mediawiki\branches\REL1_16\phase3\includes\api\ApiMain.php	2011-07-18 22:31:07.095703100 +0100
+++ D:\Programming\SVN\wikia\trunk\includes\api\ApiMain.php	2011-08-17 15:28:14.314453100 +0100
@@ -102,7 +102,8 @@
 		'txt' => 'ApiFormatTxt',
 		'txtfm' => 'ApiFormatTxt',
 		'dbg' => 'ApiFormatDbg',
-		'dbgfm' => 'ApiFormatDbg'
+		'dbgfm' => 'ApiFormatDbg',
+		'push' => 'ApiFormatPUSH'
 	);
 
 	/**
@@ -526,8 +527,14 @@
 		}
 		
 		// Instantiate the module requested by the user
+		// RT #1576 5.12.2008 Bartek
+		if ( class_exists( $this->mModules[$this->mAction] ) )  {
 		$module = new $this->mModules[$this->mAction] ( $this, $this->mAction );
 		$this->mModule = $module;
+		} else {
+			ApiBase :: dieUsage( "Trying to load a nonexistant or undefined classname" );
+			return;
+		}
 
 		$moduleParams = $module->extractRequestParams();