Merge "Migrate Api modules from tag_summary table to change_tag"
[lhc/web/wiklou.git] / includes / api / ApiQueryAllDeletedRevisions.php
index 066a644..7a1c461 100644 (file)
@@ -43,8 +43,6 @@ class ApiQueryAllDeletedRevisions extends ApiQueryRevisionsBase {
         * @return void
         */
        protected function run( ApiPageSet $resultPageSet = null ) {
-               global $wgChangeTagsSchemaMigrationStage;
-
                // Before doing anything at all, let's check permissions
                $this->checkUserRightsAny( 'deletedhistory' );
 
@@ -135,16 +133,12 @@ class ApiQueryAllDeletedRevisions extends ApiQueryRevisionsBase {
                        $this->addJoinConds(
                                [ 'change_tag' => [ 'INNER JOIN', [ 'ar_rev_id=ct_rev_id' ] ] ]
                        );
-                       if ( $wgChangeTagsSchemaMigrationStage > MIGRATION_WRITE_BOTH ) {
-                               $changeTagDefStore = MediaWikiServices::getInstance()->getChangeTagDefStore();
-                               try {
-                                       $this->addWhereFld( 'ct_tag_id', $changeTagDefStore->getId( $params['tag'] ) );
-                               } catch ( NameTableAccessException $exception ) {
-                                       // Return nothing.
-                                       $this->addWhere( '1=0' );
-                               }
-                       } else {
-                               $this->addWhereFld( 'ct_tag', $params['tag'] );
+                       $changeTagDefStore = MediaWikiServices::getInstance()->getChangeTagDefStore();
+                       try {
+                               $this->addWhereFld( 'ct_tag_id', $changeTagDefStore->getId( $params['tag'] ) );
+                       } catch ( NameTableAccessException $exception ) {
+                               // Return nothing.
+                               $this->addWhere( '1=0' );
                        }
                }