Legoktm has uploaded a new change for review.

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

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(-)


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

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/159231
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic448da2b58beacfc451f900a4fbd7d2158b6e44f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

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

Reply via email to