X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryDeletedrevs.php;h=f46fb34f5a30446a10387921e672d9f00f84d98d;hb=37297d5468a2339b20e6aebffe9031cf72584270;hp=4a5f5fdc7efbe0698311e45bac6495b37a16769a;hpb=08e21a46f775f038abca424b7c15f9cad3510984;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryDeletedrevs.php b/includes/api/ApiQueryDeletedrevs.php index 4a5f5fdc7e..f46fb34f5a 100644 --- a/includes/api/ApiQueryDeletedrevs.php +++ b/includes/api/ApiQueryDeletedrevs.php @@ -28,6 +28,7 @@ * Query module to enumerate all deleted revisions. * * @ingroup API + * @deprecated since 1.25 */ class ApiQueryDeletedrevs extends ApiQueryBase { @@ -45,6 +46,12 @@ class ApiQueryDeletedrevs extends ApiQueryBase { ); } + $this->setWarning( + 'list=deletedrevs has been deprecated. Please use prop=deletedrevisions or ' . + 'list=alldeletedrevisions instead.' + ); + $this->logFeatureUsage( 'action=query&list=deletedrevs' ); + $db = $this->getDB(); $params = $this->extractRequestParams( false ); $prop = array_flip( $params['prop'] ); @@ -68,8 +75,9 @@ class ApiQueryDeletedrevs extends ApiQueryBase { ); } - // If we're in JSON callback mode, no tokens can be obtained - if ( !is_null( $this->getMain()->getRequest()->getVal( 'callback' ) ) ) { + // If we're in a mode that breaks the same-origin policy, no tokens can + // be obtained + if ( $this->lacksSameOriginSecurity() ) { $fld_token = false; } @@ -420,6 +428,10 @@ class ApiQueryDeletedrevs extends ApiQueryBase { $result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'page' ); } + public function isDeprecated() { + return true; + } + public function getAllowedParams() { return array( 'start' => array(