X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiMergeHistory.php;h=357698e13c40eba25fce32d29f69e7fbb7674857;hb=20f0da437eeed7e8ca28be911f53535be82889a1;hp=72847ea55ee3fa2907252e7681ffe969ba26163d;hpb=d42754e47722436ef52218f21a8e544a05ee9ad7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiMergeHistory.php b/includes/api/ApiMergeHistory.php index 72847ea55e..357698e13c 100644 --- a/includes/api/ApiMergeHistory.php +++ b/includes/api/ApiMergeHistory.php @@ -33,7 +33,6 @@ class ApiMergeHistory extends ApiBase { public function execute() { $this->useTransactionalTimeLimit(); - $user = $this->getUser(); $params = $this->extractRequestParams(); $this->requireOnlyOneParameter( $params, 'from', 'fromid' ); @@ -43,24 +42,24 @@ class ApiMergeHistory extends ApiBase { if ( isset( $params['from'] ) ) { $fromTitle = Title::newFromText( $params['from'] ); if ( !$fromTitle || $fromTitle->isExternal() ) { - $this->dieUsageMsg( [ 'invalidtitle', $params['from'] ] ); + $this->dieWithError( [ 'apierror-invalidtitle', wfEscapeWikiText( $params['from'] ) ] ); } } elseif ( isset( $params['fromid'] ) ) { $fromTitle = Title::newFromID( $params['fromid'] ); if ( !$fromTitle ) { - $this->dieUsageMsg( [ 'nosuchpageid', $params['fromid'] ] ); + $this->dieWithError( [ 'apierror-nosuchpageid', $params['fromid'] ] ); } } if ( isset( $params['to'] ) ) { $toTitle = Title::newFromText( $params['to'] ); if ( !$toTitle || $toTitle->isExternal() ) { - $this->dieUsageMsg( [ 'invalidtitle', $params['to'] ] ); + $this->dieWithError( [ 'apierror-invalidtitle', wfEscapeWikiText( $params['to'] ) ] ); } } elseif ( isset( $params['toid'] ) ) { $toTitle = Title::newFromID( $params['toid'] ); if ( !$toTitle ) { - $this->dieUsageMsg( [ 'nosuchpageid', $params['toid'] ] ); + $this->dieWithError( [ 'apierror-nosuchpageid', $params['toid'] ] ); } }