Merge "installer: Clear module_deps cache in updater"
[lhc/web/wiklou.git] / includes / api / ApiQueryDeletedrevs.php
index 4a5f5fd..f46fb34 100644 (file)
@@ -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(