WikiPage: Do not set "undid revision ID" for rollbacks
authorMatěj Suchánek <matejsuchanek97@gmail.com>
Fri, 29 Jun 2018 20:53:11 +0000 (22:53 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Fri, 29 Jun 2018 20:55:08 +0000 (22:55 +0200)
It causes them to be tagged with the "mw-undo" tag, in addition to the
"mw-rollback" tag they already have.

Bug: T190374
Change-Id: Ia447a107f0844cfef4a51a72fdec7aeea0480c70

includes/page/WikiPage.php

index ad3c8c5..c25ff35 100644 (file)
@@ -2959,7 +2959,7 @@ class WikiPage implements Page, IDBAccessObject {
                }
 
                $updater->setOriginalRevisionId( $target->getId() );
-               $updater->setUndidRevisionId( $current->getId() );
+               // Do not call setUndidRevisionId(), that causes an extra "mw-undo" tag to be added (T190374)
                $updater->addTags( $tags );
 
                // TODO: this logic should not be in the storage layer, it's here for compatibility