Robert Vogel has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/404951 )
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: Iaf947eac2ed2595c67959b1d1bb392408e20a259
---
M PageTemplates.class.php
M extension.json
A src/AdminTool.php
3 files changed, 43 insertions(+), 11 deletions(-)
Approvals:
Robert Vogel: Verified; Looks good to me, approved
diff --git a/PageTemplates.class.php b/PageTemplates.class.php
index 39013da..bcbdecf 100644
--- a/PageTemplates.class.php
+++ b/PageTemplates.class.php
@@ -36,17 +36,6 @@
*/
class PageTemplates extends BsExtensionMW {
- public function __construct() {
- wfProfileIn( 'BS::'.__METHOD__ );
- WikiAdmin::registerModuleClass( 'PageTemplatesAdmin', array(
- 'image' =>
'/extensions/BlueSpiceExtensions/WikiAdmin/resources/images/bs-btn_templates_v1.png',
- 'level' => 'wikiadmin',
- 'message' => 'bs-pagetemplatesadmin-label',
- 'iconCls' => 'bs-icon-clipboard-checked',
- 'permissions' => [ 'pagetemplatesadmin-viewspecialpage'
],
- ) );
- wfProfileOut( 'BS::'.__METHOD__ );
- }
/**
* Initialization of PageTemplates extension
*/
diff --git a/extension.json b/extension.json
index 76a3d5d..7914cf4 100644
--- a/extension.json
+++ b/extension.json
@@ -22,6 +22,9 @@
"PageTemplateHideIfNotInTargetNs":
"\\BlueSpice\\PageTemplates\\ConfigDefinition\\PageTemplatesHideIfNotInTargetNS::getInstance"
}
}
+ },
+ "AdminToolRegistry": {
+ "bs-pagetemplates":
"BlueSpice\\PageTemplates\\AdminTool"
}
}
},
diff --git a/src/AdminTool.php b/src/AdminTool.php
new file mode 100644
index 0000000..eb099e4
--- /dev/null
+++ b/src/AdminTool.php
@@ -0,0 +1,40 @@
+<?php
+
+namespace BlueSpice\PageTemplates;
+
+use BlueSpice\IAdminTool;
+
+class AdminTool implements IAdminTool {
+
+ public function getURL() {
+ $tool = \SpecialPage::getTitleFor( 'PageTemplatesAdmin' );
+ return $tool->getLocalURL();
+ }
+
+ public function getDescription() {
+ return wfMessage( 'bs-pagetemplates-desc' );
+ }
+
+ public function getName() {
+ return wfMessage( 'bs-pagetemplatesadmin-label' );
+ }
+
+ public function getClasses() {
+ $classes = array(
+ 'bs-icon-clipboard-checked'
+ );
+
+ return $classes;
+ }
+
+ public function getDataAttributes() {
+ }
+
+ public function getPermissions() {
+ $permissions = array(
+ 'pagetemplatesadmin-viewspecialpage'
+ );
+ return $permissions;
+ }
+
+}
\ No newline at end of file
--
To view, visit https://gerrit.wikimedia.org/r/404951
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf947eac2ed2595c67959b1d1bb392408e20a259
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpicePageTemplates
Gerrit-Branch: master
Gerrit-Owner: Dvogel hallowelt <[email protected]>
Gerrit-Reviewer: Ljonka <[email protected]>
Gerrit-Reviewer: Mglaser <[email protected]>
Gerrit-Reviewer: Pwirth <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits