Matthias Mullie has uploaded a new change for review.

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


Change subject: Add setChildren() & setDepth() in loadTopicTitle
......................................................................

Add setChildren() & setDepth() in loadTopicTitle

Change-Id: If8d571e972d8c9c42bf3958b1e82529ce61ed9ef
---
M includes/Block/Topic.php
1 file changed, 6 insertions(+), 0 deletions(-)


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

diff --git a/includes/Block/Topic.php b/includes/Block/Topic.php
index ae15731..27514b7 100644
--- a/includes/Block/Topic.php
+++ b/includes/Block/Topic.php
@@ -688,6 +688,12 @@
                                throw new \MWException( 'Every workflow must 
have an associated topic title' );
                        }
                        $this->topicTitle = reset( $found );
+
+                       // this method loads only title, nothing else; 
otherwise, you're
+                       // looking for loadRootPost
+                       $this->topicTitle->setChildren( array( 0 ));
+                       $this->topicTitle->setDepth( 0 );
+
                        if ( !$this->permissions->isAllowed( $this->topicTitle, 
'view' ) ) {
                                $this->topicTitle = null;
                                $this->errors['permissions'] = wfMessage( 
'flow-error-not-allowed' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8d571e972d8c9c42bf3958b1e82529ce61ed9ef
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