'tokens' => 'ApiTokens',
'checktoken' => 'ApiCheckToken',
'cspreport' => 'ApiCSPReport',
+ 'validatepassword' => 'ApiValidatePassword',
// Write modules
'purge' => 'ApiPurge',
'managetags' => 'ApiManageTags',
'tag' => 'ApiTag',
'mergehistory' => 'ApiMergeHistory',
+ 'setpagelanguage' => 'ApiSetPageLanguage',
];
/**
$params = [
'apierror-exceptioncaught',
WebRequest::getRequestId(),
- wfEscapeWikiText( $e->getMessage() )
+ $e instanceof ILocalizedException
+ ? $e->getMessageObject()
+ : wfEscapeWikiText( $e->getMessage() )
];
}
$messages[] = ApiMessage::create( $params, $code );
$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',