Matthias Mullie has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/218689

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 includes/Content/Content.php
2 files changed, 0 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/89/218689/1

diff --git a/Flow.php b/Flow.php
index c20ba42..f420053 100644
--- a/Flow.php
+++ b/Flow.php
@@ -127,7 +127,6 @@
 $wgHooks['ResourceLoaderTestModules'][] = 
'FlowHooks::onResourceLoaderTestModules';
 $wgHooks['ContentHandlerDefaultModelFor'][] = 
'Flow\Content\Content::onGetDefaultModel';
 $wgHooks['ShowMissingArticle'][] = 
'Flow\Content\Content::onShowMissingArticle';
-$wgHooks['ArticleAfterFetchContentObject'][] = 
'Flow\Content\Content::onFetchContentObject';
 $wgHooks['MessageCache::get'][] = 'FlowHooks::onMessageCacheGet';
 $wgHooks['WatchArticle'][] = 'FlowHooks::onWatchArticle';
 $wgHooks['UnwatchArticle'][] = 'FlowHooks::onWatchArticle';
diff --git a/includes/Content/Content.php b/includes/Content/Content.php
index 3118003..e42679e 100644
--- a/includes/Content/Content.php
+++ b/includes/Content/Content.php
@@ -39,35 +39,4 @@
 
                return false;
        }
-
-       static function onFetchContentObject( Article &$article, \Content 
&$contentObject = null ) {
-               if ( $contentObject === null ) {
-                       return true;
-               }
-
-               $occupationController = \FlowHooks::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: newchange
Gerrit-Change-Id: Ie1eb25727821f04283f25c1acc2640c85734da57
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to