Merge "Datatable: Unify `padding` with `.wikitable`"
[lhc/web/wiklou.git] / includes / api / ApiQueryRecentChanges.php
index 303668e..7c6b463 100644 (file)
@@ -143,8 +143,6 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
         * @param ApiPageSet|null $resultPageSet
         */
        public function run( $resultPageSet = null ) {
-               global $wgChangeTagsSchemaMigrationStage;
-
                $user = $this->getUser();
                /* Get the parameters of the request. */
                $params = $this->extractRequestParams();
@@ -363,16 +361,12 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                if ( !is_null( $params['tag'] ) ) {
                        $this->addTables( 'change_tag' );
                        $this->addJoinConds( [ 'change_tag' => [ 'INNER JOIN', [ 'rc_id=ct_rc_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' );
                        }
                }