Harej has uploaded a new change for review. https://gerrit.wikimedia.org/r/312711
Change subject: Restricting CollaborationHubContent and CollaborationListContent to user and project namespaces. ...................................................................... Restricting CollaborationHubContent and CollaborationListContent to user and project namespaces. Change-Id: Id19a49287e5a6453bc35e2c0e3d8816e9b8a6119 --- M includes/content/CollaborationHubContentHandler.php M includes/content/CollaborationListContentHandler.php 2 files changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit refs/changes/11/312711/1 diff --git a/includes/content/CollaborationHubContentHandler.php b/includes/content/CollaborationHubContentHandler.php index 9dd3024..d6a8e0e 100644 --- a/includes/content/CollaborationHubContentHandler.php +++ b/includes/content/CollaborationHubContentHandler.php @@ -6,6 +6,13 @@ parent::__construct( $modelId ); } + public function canBeUsedOn( Title $title ) { + if ( $title->inNamespace( NS_PROJECT ) || $title->inNamespace( NS_USER ) ) { + return true; + } + return false; + } + /** * @param string $text * @param string $format diff --git a/includes/content/CollaborationListContentHandler.php b/includes/content/CollaborationListContentHandler.php index d2b04a7..b10da7c 100644 --- a/includes/content/CollaborationListContentHandler.php +++ b/includes/content/CollaborationListContentHandler.php @@ -19,6 +19,13 @@ parent::__construct( $modelId, $formats ); } + public function canBeUsedOn( Title $title ) { + if ( $title->inNamespace( NS_PROJECT ) || $title->inNamespace( NS_USER ) ) { + return true; + } + return false; + } + /** * @param string $text * @param string $format -- To view, visit https://gerrit.wikimedia.org/r/312711 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id19a49287e5a6453bc35e2c0e3d8816e9b8a6119 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CollaborationKit Gerrit-Branch: master Gerrit-Owner: Harej <jamesmh...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits