Robert Vogel has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/404938 )
Change subject: WikiAdmin is not Part of BlueSpice 3. Removed unneeded code and ...................................................................... WikiAdmin is not Part of BlueSpice 3. Removed unneeded code and used new registry for admin tools Change-Id: Iedf18c172f0441fd3ab3bc01c5dedd7e12985476 --- M NamespaceManager.class.php M extension.json A src/AdminTool.php 3 files changed, 43 insertions(+), 12 deletions(-) Approvals: Robert Vogel: Verified; Looks good to me, approved diff --git a/NamespaceManager.class.php b/NamespaceManager.class.php index c6d4c3c..77652ad 100644 --- a/NamespaceManager.class.php +++ b/NamespaceManager.class.php @@ -49,18 +49,6 @@ 'dir' => '' ); - public function __construct() { - wfProfileIn( 'BS::NamespaceManager::__construct' ); - WikiAdmin::registerModule( 'NamespaceManager', [ - 'image' => '/extensions/BlueSpiceExtensions/WikiAdmin/resources/images/bs-btn_namespaces_v1.png', - 'level' => 'wikiadmin', - 'message' => 'bs-namespacemanager-label', - 'iconCls' => 'bs-icon-register-box', - 'permissions' => [ 'namespacemanager-viewspecialpage' ], - ]); - wfProfileOut( 'BS::NamespaceManager::__construct' ); - } - /** * Initialization of NamespaceManager extension */ diff --git a/extension.json b/extension.json index ce50fef..c04280a 100644 --- a/extension.json +++ b/extension.json @@ -17,6 +17,9 @@ "className": "NamespaceManager", "extPath": "/BlueSpiceNamespaceManager" } + }, + "AdminToolRegistry": { + "bs-namespace-manager": "BlueSpice\\NamespaceManager\\AdminTool" } } }, diff --git a/src/AdminTool.php b/src/AdminTool.php new file mode 100644 index 0000000..b92348e --- /dev/null +++ b/src/AdminTool.php @@ -0,0 +1,40 @@ +<?php + +namespace BlueSpice\NamespaceManager; + +use BlueSpice\IAdminTool; + +class AdminTool implements IAdminTool { + + public function getURL() { + $tool = \SpecialPage::getTitleFor( 'NamespaceManager' ); + return $tool->getLocalURL(); + } + + public function getDescription() { + return wfMessage( 'bs-namespacemanager-desc' ); + } + + public function getName() { + return wfMessage( 'bs-namespacemanager-label' ); + } + + public function getClasses() { + $classes = array( + 'bs-icon-register-box' + ); + + return $classes; + } + + public function getDataAttributes() { + } + + public function getPermissions() { + $permissions = array( + 'namespacemanager-viewspecialpage' + ); + return $permissions; + } + +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/404938 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iedf18c172f0441fd3ab3bc01c5dedd7e12985476 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceNamespaceManager Gerrit-Branch: master Gerrit-Owner: Dvogel hallowelt <daniel.vo...@hallowelt.com> Gerrit-Reviewer: Ljonka <l.verhovs...@gmail.com> Gerrit-Reviewer: Mglaser <gla...@hallowelt.biz> Gerrit-Reviewer: Pwirth <wi...@hallowelt.biz> Gerrit-Reviewer: Robert Vogel <vo...@hallowelt.biz> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits