X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiFeedRecentChanges.php;h=0b04c8cc928e2d88a17e6804877130b3845a46d8;hb=e51501bfb93ee04469c9275709c519f236fd57b0;hp=813ac013a02f649c63bf9001cd04d47af9a13613;hpb=601519ee36462faabacf4547c9aefaf7e8726476;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiFeedRecentChanges.php b/includes/api/ApiFeedRecentChanges.php index 813ac013a0..0b04c8cc92 100644 --- a/includes/api/ApiFeedRecentChanges.php +++ b/includes/api/ApiFeedRecentChanges.php @@ -47,17 +47,17 @@ class ApiFeedRecentChanges extends ApiBase { $this->params = $this->extractRequestParams(); if ( !$config->get( 'Feed' ) ) { - $this->dieUsage( 'Syndication feeds are not available', 'feed-unavailable' ); + $this->dieWithError( 'feed-unavailable' ); } $feedClasses = $config->get( 'FeedClasses' ); if ( !isset( $feedClasses[$this->params['feedformat']] ) ) { - $this->dieUsage( 'Invalid subscription feed type', 'feed-invalid' ); + $this->dieWithError( 'feed-invalid' ); } $this->getMain()->setCacheMode( 'public' ); if ( !$this->getMain()->getParameter( 'smaxage' ) ) { - // bug 63249: This page gets hit a lot, cache at least 15 seconds. + // T65249: This page gets hit a lot, cache at least 15 seconds. $this->getMain()->setCacheMaxAge( 15 ); } @@ -98,7 +98,7 @@ class ApiFeedRecentChanges extends ApiBase { if ( $specialClass === 'SpecialRecentchangeslinked' ) { $title = Title::newFromText( $this->params['target'] ); if ( !$title ) { - $this->dieUsageMsg( [ 'invalidtitle', $this->params['target'] ] ); + $this->dieWithError( [ 'apierror-invalidtitle', wfEscapeWikiText( $this->params['target'] ) ] ); } $feed = new ChangesFeed( $feedFormat, false );