jenkins-bot has submitted this change and it was merged.
Change subject: Don't write when we're reading data
......................................................................
Don't write when we're reading data
I don't think we need this anyway. I think this is a leftover from
back when we used to occupy pages when loading Flow data (because
we weren't properly catching all write cases)
Bug: T101890
Change-Id: Ie1eb25727821f04283f25c1acc2640c85734da57
---
M Flow.php
M Hooks.php
2 files changed, 0 insertions(+), 32 deletions(-)
Approvals:
Sbisson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/Flow.php b/Flow.php
index f550572..f434037 100644
--- a/Flow.php
+++ b/Flow.php
@@ -127,7 +127,6 @@
$wgHooks['ResourceLoaderTestModules'][] =
'FlowHooks::onResourceLoaderTestModules';
$wgHooks['ContentHandlerDefaultModelFor'][] =
'FlowHooks::onContentHandlerDefaultModelFor';
$wgHooks['ShowMissingArticle'][] = 'FlowHooks::onShowMissingArticle';
-$wgHooks['ArticleAfterFetchContentObject'][] =
'FlowHooks::onArticleAfterFetchContentObject';
$wgHooks['MessageCache::get'][] = 'FlowHooks::onMessageCacheGet';
$wgHooks['WatchArticle'][] = 'FlowHooks::onWatchArticle';
$wgHooks['UnwatchArticle'][] = 'FlowHooks::onWatchArticle';
diff --git a/Hooks.php b/Hooks.php
index 7c9add1..327fa9e 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -1486,35 +1486,4 @@
return false;
}
-
- public static function onArticleAfterFetchContentObject( Article
&$article, Content &$contentObject = null ) {
- if ( $contentObject === null ) {
- return true;
- }
-
- $occupationController = self::getOccupationController();
- $title = $article->getTitle();
-
- if ( $occupationController->isTalkpageOccupied( $title ) ) {
- /** @var WorkflowLoaderFactory $factory */
- $factory = Container::get( 'factory.loader.workflow' );
- $loader = $factory->createWorkflowLoader( $title );
-
- $status = $occupationController->ensureFlowRevision(
$article, $loader->getWorkflow() );
-
- if ( $status->isGood() ) {
- $value = $status->getValue();
- if ( isset( $value['revision'] ) &&
!$value['already-existed'] ) {
- $newRev = $value['revision'];
- /** @noinspection
PhpUndefinedFieldInspection */
- $article->getPage()->mRevision =
$newRev;
- /** @noinspection
PhpUndefinedFieldInspection */
- $article->getPage()->mContentObject =
$newRev->getContent();
- $contentObject = $newRev->getContent();
- }
- }
- }
-
- return true;
- }
}
--
To view, visit https://gerrit.wikimedia.org/r/218689
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1eb25727821f04283f25c1acc2640c85734da57
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: Sbisson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits