LogEntry: Restore logic to add change tags on udp-only publish
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 12 Mar 2019 14:55:27 +0000 (10:55 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Tue, 12 Mar 2019 14:55:27 +0000 (10:55 -0400)
This was unintentionally removed in I8df2fd98.

Bug: T218110
Change-Id: Ie8678b4207032d6eb877d596eb8f115798c80a1e

includes/logging/LogEntry.php

index 35f1a06..a154f64 100644 (file)
@@ -785,6 +785,12 @@ class ManualLogEntry extends LogEntryBase {
                                                // save RC, passing tags so they are applied there
                                                $rc->addTags( $this->getTags() );
                                                $rc->save( $rc::SEND_NONE );
+                                       } else {
+                                               $tags = $this->getTags();
+                                               if ( $tags ) {
+                                                       $revId = $this->getAssociatedRevId(); // Use null if $revId is 0
+                                                       ChangeTags::addTags( $tags, null, $revId > 0 ? $revId : null, $newId );
+                                               }
                                        }
 
                                        if ( $to === 'udp' || $to === 'rcandudp' ) {