jenkins-bot has submitted this change and it was merged.

Change subject: BoardMover: don't try to save a null edit
......................................................................


BoardMover: don't try to save a null edit

BoardMover assists in the move of Flow pages by
updating objects' association from the old to
the new page.

It also tries to reparse the current header
so magic words like basepagename are updated
for the new page location. This part
sometimes generates null edits that are not
seen as null edits by the storage layer. This
leads to exceptions that abort the move but do
not bubble up to the OptinController. It results
in inconsistent state.

Bug: T138310
Change-Id: Iff7f699b7604da608154231c4d46b17c1dc08541
---
M includes/BoardMover.php
1 file changed, 5 insertions(+), 3 deletions(-)

Approvals:
  Mattflaschen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/BoardMover.php b/includes/BoardMover.php
index 988a8c2..41344bd 100644
--- a/includes/BoardMover.php
+++ b/includes/BoardMover.php
@@ -109,9 +109,11 @@
                                'edit-header',
                                $newPage
                        );
-                       $this->storage->put( $nextHeader, array(
-                               'workflow' => $discussionWorkflow,
-                       ) );
+                       if ( $header !== $nextHeader ) {
+                               $this->storage->put( $nextHeader, array(
+                                       'workflow' => $discussionWorkflow,
+                               ) );
+                       }
                }
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/313052
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff7f699b7604da608154231c4d46b17c1dc08541
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Sbisson <sbis...@wikimedia.org>
Gerrit-Reviewer: Mattflaschen <mflasc...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to