jenkins-bot has submitted this change and it was merged. Change subject: Remove workaround code from when pageid could still be 0 ......................................................................
Remove workaround code from when pageid could still be 0 Change-Id: I0148c71dafef6f54069403df72c30a9640afda34 --- M includes/BoardMover.php M includes/Model/Workflow.php 2 files changed, 2 insertions(+), 13 deletions(-) Approvals: Mattflaschen: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/BoardMover.php b/includes/BoardMover.php index 6f2e603..58552d1 100644 --- a/includes/BoardMover.php +++ b/includes/BoardMover.php @@ -75,11 +75,7 @@ // revisit this. $found = $this->storage->find( 'Workflow', array( 'workflow_wiki' => wfWikiId(), - // @todo once workflow_page_id is reliable we can search for only - // the page id and skip the namespace/title text - 'workflow_namespace' => $oldTitle->getNamespace(), - 'workflow_title_text' => $oldTitle->getDBkey(), - 'workflow_page_id' => array( 0, $oldTitle->getArticleID() ), + 'workflow_page_id' => $oldTitle->getArticleID(), ) ); if ( !$found ) { throw new FlowException( "Could not locate workflow for $oldTitle" ); diff --git a/includes/Model/Workflow.php b/includes/Model/Workflow.php index b9ae475..4b8ebc0 100644 --- a/includes/Model/Workflow.php +++ b/includes/Model/Workflow.php @@ -182,14 +182,7 @@ * @throws DataModelException */ public function updateFromTitle( Title $oldTitle, Title $newTitle ) { - // temporary hack. @todo write maintenance script to fix all of these - if ( $this->pageId === 0 ) { - if ( $this->getOwnerTitle()->equals( $oldTitle ) ) { - $this->pageId = $oldTitle->getArticleID(); - } else { - throw new DataModelException( "The provided oldTitle ({$oldTitle->getPrefixedDBkey()}) does not match this workflow." ); - } - } elseif ( $oldTitle->getArticleID() !== $this->pageId ) { + if ( $oldTitle->getArticleID() !== $this->pageId ) { throw new DataModelException( 'Must update from title with same page id. ' . $this->pageId . ' !== ' . $oldTitle->getArticleID() ); } -- To view, visit https://gerrit.wikimedia.org/r/205612 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0148c71dafef6f54069403df72c30a9640afda34 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie <mmul...@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