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

Change subject: Disallow moving in Topic: namespace
......................................................................


Disallow moving in Topic: namespace

Bug: T87396
Change-Id: I382041d1151a45c8a33c3525e3019772eddeb993
---
M Flow.php
M Hooks.php
2 files changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/Flow.php b/Flow.php
index 8c25410..fe33f89 100644
--- a/Flow.php
+++ b/Flow.php
@@ -92,6 +92,7 @@
 $wgHooks['TitleSquidURLs'][] = 'FlowHooks::onTitleSquidURLs';
 $wgHooks['WatchlistEditorBuildRemoveLine'][] = 
'FlowHooks::onWatchlistEditorBuildRemoveLine';
 $wgHooks['WatchlistEditorBeforeFormRender'][] = 
'FlowHooks::onWatchlistEditorBeforeFormRender';
+$wgHooks['NamespaceIsMovable'][] = 'FlowHooks::onNamespaceIsMovable';
 
 // Extension:UserMerge support
 $wgHooks['UserMergeAccountFields'][] = 'FlowHooks::onUserMergeAccountFields';
diff --git a/Hooks.php b/Hooks.php
index a608d50..5967f58 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -1106,4 +1106,14 @@
 
                return true;
        }
+
+       /**
+        * @param int $namespace
+        * @param bool $movable
+        * @return bool
+        */
+       public static function onNamespaceIsMovable( $namespace, &$movable ) {
+               $movable &= $namespace !== NS_TOPIC;
+               return true;
+       }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I382041d1151a45c8a33c3525e3019772eddeb993
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.25wmf15
Gerrit-Owner: Matthias Mullie <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to