Merge "Add GENDER to rollback-success message"
[lhc/web/wiklou.git] / includes / api / ApiMain.php
index 54679a8..9e00830 100644 (file)
@@ -79,6 +79,7 @@ class ApiMain extends ApiBase {
                'tokens' => 'ApiTokens',
                'checktoken' => 'ApiCheckToken',
                'cspreport' => 'ApiCSPReport',
+               'validatepassword' => 'ApiValidatePassword',
 
                // Write modules
                'purge' => 'ApiPurge',
@@ -105,6 +106,7 @@ class ApiMain extends ApiBase {
                'managetags' => 'ApiManageTags',
                'tag' => 'ApiTag',
                'mergehistory' => 'ApiMergeHistory',
+               'setpagelanguage' => 'ApiSetPageLanguage',
        ];
 
        /**
@@ -1107,10 +1109,16 @@ class ApiMain extends ApiBase {
                        $result->addContentValue(
                                $path,
                                'docref',
-                               $this->msg( 'api-usage-docref', $link )->inLanguage( $formatter->getLanguage() )->text()
+                               trim(
+                                       $this->msg( 'api-usage-docref', $link )->inLanguage( $formatter->getLanguage() )->text()
+                                       . ' '
+                                       . $this->msg( 'api-usage-mailinglist-ref' )->inLanguage( $formatter->getLanguage() )->text()
+                               )
                        );
                } else {
-                       if ( $config->get( 'ShowExceptionDetails' ) ) {
+                       if ( $config->get( 'ShowExceptionDetails' ) &&
+                               ( !$e instanceof DBError || $config->get( 'ShowDBErrorBacktrace' ) )
+                       ) {
                                $result->addContentValue(
                                        $path,
                                        'trace',