jenkins-bot has submitted this change and it was merged.

Change subject: Don't let people turn random pages into Flow pages
......................................................................


Don't let people turn random pages into Flow pages

Change-Id: Ic448da2b58beacfc451f900a4fbd7d2158b6e44f
---
M includes/Content/BoardContentHandler.php
1 file changed, 13 insertions(+), 0 deletions(-)

Approvals:
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Content/BoardContentHandler.php 
b/includes/Content/BoardContentHandler.php
index 1336b25..685db19 100644
--- a/includes/Content/BoardContentHandler.php
+++ b/includes/Content/BoardContentHandler.php
@@ -79,6 +79,19 @@
        }
 
        /**
+        * Don't let people turn random pages into
+        * Flow ones until we want them to.
+        *
+        * @param \Title $title
+        * @return bool
+        */
+       public function canBeUsedOn( \Title $title ) {
+               /** @var \Flow\TalkpageManager $manager */
+               $manager = Container::get( 'occupation_controller' );
+               return $manager->isTalkpageOccupied( $title );
+       }
+
+       /**
         * Returns overrides for action handlers.
         * Classes listed here will be used instead of the default one when
         * (and only when) $wgActions[$action] === true. This allows subclasses

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic448da2b58beacfc451f900a4fbd7d2158b6e44f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.24wmf20
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: SG <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to