X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryBacklinks.php;h=b3ac606fa931d072b68a40a9da528e77994c4009;hb=1949b15d1a762464186c7ce658a6a9d3c33cab06;hp=fb502e40e75f1f66f51cf0e3ab71ddb88ccaf37d;hpb=f43fa6f4f0e2cb60b8543daad661b48a3e0653a9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryBacklinks.php b/includes/api/ApiQueryBacklinks.php index fb502e40e7..b3ac606fa9 100644 --- a/includes/api/ApiQueryBacklinks.php +++ b/includes/api/ApiQueryBacklinks.php @@ -152,7 +152,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { if ( $this->params['filterredir'] == 'redirects' ) { $this->addWhereFld( 'page_is_redirect', 1 ); } elseif ( $this->params['filterredir'] == 'nonredirects' && !$this->redirect ) { - // bug 22245 - Check for !redirect, as filtering nonredirects, when + // T24245 - Check for !redirect, as filtering nonredirects, when // getting what links to them is contradictory $this->addWhereFld( 'page_is_redirect', 0 ); } @@ -344,12 +344,12 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { $this->validateLimit( 'limit', $this->params['limit'], 1, $userMax, $botMax ); } - $this->rootTitle = $this->getTitleOrPageId( $this->params )->getTitle(); + $this->rootTitle = $this->getTitleFromTitleOrPageId( $this->params ); // only image titles are allowed for the root in imageinfo mode if ( !$this->hasNS && $this->rootTitle->getNamespace() !== NS_FILE ) { - $this->dieUsage( - "The title for {$this->getModuleName()} query must be a file", + $this->dieWithError( + [ 'apierror-imageusage-badtitle', $this->getModuleName() ], 'bad_image_title' ); }