Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/325730
Change subject: FlowFixInconsistentBoards: Don't output non-critical error info ...................................................................... FlowFixInconsistentBoards: Don't output non-critical error info Only output diagnostic info re $workflowByPageId if it prevents us from fixing an inconsistent board. Bug: T148057 Change-Id: I42872d8784298936144c23c6801843a67b2b1bbd --- M maintenance/FlowFixInconsistentBoards.php 1 file changed, 13 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/30/325730/1 diff --git a/maintenance/FlowFixInconsistentBoards.php b/maintenance/FlowFixInconsistentBoards.php index 08f6a8f..de3ebb8 100644 --- a/maintenance/FlowFixInconsistentBoards.php +++ b/maintenance/FlowFixInconsistentBoards.php @@ -121,24 +121,24 @@ continue; } - $pageId = (int)$row->page_id; - - // Sanity check, or this will fail in BoardMover - $workflowByPageId = $this->storage->find( 'Workflow', array( - 'workflow_wiki' => wfWikiID(), - 'workflow_page_id' => $pageId, - ) ); - - if ( !$workflowByPageId ) { - $this->error( "ERROR: '$coreTitle' has page ID '$pageId', but no workflow is linked to this page ID" ); - continue; - } - if ( !$workflow->matchesTitle( $coreTitle ) ) { $workflowTitle = $workflow->getOwnerTitle(); $this->output( "INCONSISTENT: Core title for '$workflowIdAlphadecimal' is '$coreTitle', but Flow title is '$workflowTitle'\n" ); if ( !$dryRun ) { + $pageId = (int)$row->page_id; + + // Sanity check, or this will fail in BoardMover + $workflowByPageId = $this->storage->find( 'Workflow', array( + 'workflow_wiki' => wfWikiID(), + 'workflow_page_id' => $pageId, + ) ); + + if ( !$workflowByPageId ) { + $this->error( "ERROR: '$coreTitle' has page ID '$pageId', but no workflow is linked to this page ID" ); + continue; + } + $this->boardMover->move( $pageId, $coreTitle ); $this->boardMover->commit(); $this->output( "FIXED: Updated '$workflowIdAlphadecimal' to match core title, '$coreTitle'\n" ); -- To view, visit https://gerrit.wikimedia.org/r/325730 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I42872d8784298936144c23c6801843a67b2b1bbd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Mattflaschen <mflasc...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits