Matthias Mullie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/186353
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/53/186353/1
diff --git a/Flow.php b/Flow.php
index 88b1d76..e5b970e 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 daf0757..1cfcf7c 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -1111,4 +1111,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/186353
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I382041d1151a45c8a33c3525e3019772eddeb993
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.25wmf14
Gerrit-Owner: Matthias Mullie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits