X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQuerySearch.php;h=f0c41800691c957d8f3635aa8047c746f94f718a;hb=53ecf20db8bfc2109553e80bf932dac7321d63ec;hp=72b39b64a9c33914caf391e8847fc9fefb1b11de;hpb=2dd58ade75d15a5895c0c010e17b6f729a0f72fe;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php index 72b39b64a9..f0c4180069 100644 --- a/includes/api/ApiQuerySearch.php +++ b/includes/api/ApiQuerySearch.php @@ -62,18 +62,6 @@ class ApiQuerySearch extends ApiQueryGeneratorBase { $searchInfo = array_flip( $params['info'] ); $prop = array_flip( $params['prop'] ); - // Deprecated parameters - if ( isset( $prop['hasrelated'] ) ) { - $this->addDeprecation( - [ 'apiwarn-deprecation-parameter', 'srprop=hasrelated' ], 'action=search&srprop=hasrelated' - ); - } - if ( isset( $prop['score'] ) ) { - $this->addDeprecation( - [ 'apiwarn-deprecation-parameter', 'srprop=score' ], 'action=search&srprop=score' - ); - } - // Create search engine instance and set options $search = $this->buildSearchEngine( $params ); $search->setFeatureData( 'rewrite', (bool)$params['enablerewrites'] ); @@ -245,6 +233,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase { $title = $result->getTitle(); ApiQueryBase::addTitleInfo( $vals, $title ); + $vals['pageid'] = $title->getArticleID(); if ( isset( $prop['size'] ) ) { $vals['size'] = $result->getByteSize(); @@ -386,6 +375,10 @@ class ApiQuerySearch extends ApiQueryGeneratorBase { ], ApiBase::PARAM_ISMULTI => true, ApiBase::PARAM_HELP_MSG_PER_VALUE => [], + ApiBase::PARAM_DEPRECATED_VALUES => [ + 'score' => true, + 'hasrelated' => true + ], ], 'interwiki' => false, 'enablerewrites' => false,