Merge "Remove extra unneeded whitespace"
[lhc/web/wiklou.git] / includes / api / ApiMain.php
index 8c035dc..7414a97 100644 (file)
@@ -80,6 +80,7 @@ class ApiMain extends ApiBase {
                'patrol' => 'ApiPatrol',
                'import' => 'ApiImport',
                'userrights' => 'ApiUserrights',
+               'options' => 'ApiOptions',
        );
 
        /**
@@ -361,7 +362,7 @@ class ApiMain extends ApiBase {
                        $this->executeAction();
                } catch ( Exception $e ) {
                        // Log it
-                       if ( $e instanceof MWException ) {
+                       if ( !( $e instanceof UsageException ) ) {
                                wfDebugLog( 'exception', $e->getLogMessage() );
                        }
 
@@ -714,6 +715,9 @@ class ApiMain extends ApiBase {
                $module->profileOut();
 
                if ( !$this->mInternalMode ) {
+                       //append Debug information
+                       MWDebug::appendDebugInfoToApiResult( $this->getContext(), $this->getResult() );
+
                        // Print result data
                        $this->printResult( false );
                }