Merge "Convert Special:DeletedContributions to use OOUI."
[lhc/web/wiklou.git] / includes / logging / LogEntry.php
index 7746d99..21864ee 100644 (file)
@@ -714,6 +714,12 @@ class ManualLogEntry extends LogEntryBase {
                                        $rc = $this->getRecentChange( $newId );
 
                                        if ( $to === 'rc' || $to === 'rcandudp' ) {
+                                               // save RC, passing tags so they are applied there
+                                               $tags = $this->getTags();
+                                               if ( is_null( $tags ) ) {
+                                                       $tags = [];
+                                               }
+                                               $rc->addTags( $tags );
                                                $rc->save( 'pleasedontudp' );
                                        }
 
@@ -727,14 +733,6 @@ class ManualLogEntry extends LogEntryBase {
                                        ) {
                                                PatrolLog::record( $rc, true, $this->getPerformer() );
                                        }
-
-                                       // Add change tags to the log entry and (if applicable) the associated revision
-                                       $tags = $this->getTags();
-                                       if ( !is_null( $tags ) ) {
-                                               $rcId = $rc->getAttribute( 'rc_id' );
-                                               $revId = $this->getAssociatedRevId(); // Use null if $revId is 0
-                                               ChangeTags::addTags( $tags, $rcId, $revId > 0 ? $revId : null, $newId );
-                                       }
                                }
                        },
                        DeferredUpdates::POSTSEND,