X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiMain.php;h=6d76f8c94435c446ad939af4a358c8364fd7340b;hb=50f1de243986a1d006fb4500fb19e5fa88cce336;hp=52f1d95830ffda43a43242e8251463b1a95bdc4c;hpb=a04561095048bc2803b9821165c614df96eaf14a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 52f1d95830..6d76f8c944 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -574,7 +574,7 @@ class ApiMain extends ApiBase { * @param Exception $e */ protected function handleException( Exception $e ) { - // Bug 63145: Rollback any open database transactions + // T65145: Rollback any open database transactions if ( !( $e instanceof ApiUsageException || $e instanceof UsageException ) ) { // UsageExceptions are intentional, so don't rollback if that's the case try { @@ -1109,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', @@ -1662,7 +1668,7 @@ class ApiMain extends ApiBase { $ret = $this->getRequest()->getVal( $name ); if ( $ret === null ) { if ( $this->getRequest()->getArray( $name ) !== null ) { - // See bug 10262 for why we don't just implode( '|', ... ) the + // See T12262 for why we don't just implode( '|', ... ) the // array. $this->addWarning( [ 'apiwarn-unsupportedarray', $name ] ); }