jenkins-bot has submitted this change and it was merged. Change subject: ResponsibleEditors: using extension.json ......................................................................
ResponsibleEditors: using extension.json Change-Id: I854541c28cec622ac48d0523b0b14331c6b52682 --- M ResponsibleEditors/ResponsibleEditors.class.php M ResponsibleEditors/ResponsibleEditors.setup.php A ResponsibleEditors/extension.json 3 files changed, 117 insertions(+), 119 deletions(-) Approvals: Robert Vogel: Looks good to me, approved jenkins-bot: Verified diff --git a/ResponsibleEditors/ResponsibleEditors.class.php b/ResponsibleEditors/ResponsibleEditors.class.php index b7c4828..e41b28b 100644 --- a/ResponsibleEditors/ResponsibleEditors.class.php +++ b/ResponsibleEditors/ResponsibleEditors.class.php @@ -35,30 +35,6 @@ protected static $aResponsibleEditorsByArticleId = array(); - public function __construct() { - wfProfileIn('BS::' . __METHOD__); - // Base settings - $this->mExtensionFile = __FILE__; - $this->mExtensionType = EXTTYPE::VARIABLE; - $this->mInfo = array( - EXTINFO::NAME => 'ResponsibleEditors', - EXTINFO::DESCRIPTION => 'bs-responsibleeditors-desc', - EXTINFO::AUTHOR => 'Robert Vogel', - EXTINFO::VERSION => 'default', - EXTINFO::STATUS => 'default', - EXTINFO::PACKAGE => 'default', - EXTINFO::URL => 'https://help.bluespice.com/index.php/ResponsibleEditors', - EXTINFO::DEPS => array( - 'bluespice' => '2.23.3', - 'StateBar' => '2.22.0', - 'Authors' => '2.22.0' - ) - ); - $this->mExtensionKey = 'MW::ResponsibleEditors'; - - wfProfileOut('BS::' . __METHOD__); - } - protected function initExt() { wfProfileIn('BS::' . __METHOD__); BsConfig::registerVar( 'MW::ResponsibleEditors::EChange', true, BsConfig::LEVEL_USER | BsConfig::TYPE_BOOL, 'bs-responsibleeditors-pref-echange', 'toggle' ); @@ -655,7 +631,7 @@ $sDispalyName = $this->mCore->getUserDisplayName($oFirstResponsibleEditor); $oResponsibleEditorsTopView->setKey('ResponsibleEditors-Top'); - $oResponsibleEditorsTopView->setIconSrc( $wgScriptPath . '/extensions/BlueSpiceExtensions/' . $this->mInfo[EXTINFO::NAME] . '/resources/images/bs-infobar-responsibleeditor.png' ); + $oResponsibleEditorsTopView->setIconSrc( $wgScriptPath . '/extensions/BlueSpiceExtensions/ResponsibleEditors/resources/images/bs-infobar-responsibleeditor.png' ); $oResponsibleEditorsTopView->setIconAlt( wfMessage( 'bs-responsibleeditors-statebartop-icon-alt' )->plain() ); $oResponsibleEditorsTopView->setText($sDispalyName); $oResponsibleEditorsTopView->setTextLinkTitle($sDispalyName); diff --git a/ResponsibleEditors/ResponsibleEditors.setup.php b/ResponsibleEditors/ResponsibleEditors.setup.php index edd9375..410af53 100644 --- a/ResponsibleEditors/ResponsibleEditors.setup.php +++ b/ResponsibleEditors/ResponsibleEditors.setup.php @@ -1,100 +1,9 @@ <?php -BsExtensionManager::registerExtension('ResponsibleEditors', BsRUNLEVEL::FULL|BsRUNLEVEL::REMOTE, BsACTION::LOAD_SPECIALPAGE); - -$wgMessagesDirs['ResponsibleEditors'] = __DIR__ . '/i18n'; - -$wgExtensionMessagesFiles['ResponsibleEditorsAlias'] = __DIR__ . '/languages/SpecialResponsibleEditors.alias.php'; - -// Specialpage and messages -$wgAutoloadClasses['ResponsibleEditors'] = __DIR__ . '/ResponsibleEditors.class.php'; -$wgAutoloadClasses['BsResponsibleEditor'] = __DIR__ . '/includes/BsResponsibleEditor.php'; -$wgAutoloadClasses['BSApiResponsibleEditorsPagesStore'] = __DIR__ . '/includes/api/BSApiResponsibleEditorsPagesStore.php'; -$wgAutoloadClasses['BSApiResponsibleEditorsActiveNamespacesStore'] = __DIR__ . '/includes/api/BSApiResponsibleEditorsActiveNamespacesStore.php'; -$wgAutoloadClasses['BSApiResponsibleEditorsPossibleEditorsStore'] = __DIR__ . '/includes/api/BSApiResponsibleEditorsPossibleEditorsStore.php'; -$wgAutoloadClasses['BSApiTasksResponsibleEditors'] = __DIR__ . '/includes/api/BSApiTasksResponsibleEditors.php'; -$wgAutoloadClasses['SpecialResponsibleEditors'] = __DIR__ . '/includes/specials/SpecialResponsibleEditors.class.php'; -$wgAutoloadClasses['ResponsibleEditorFormatter'] = __DIR__ . '/includes/ResponsibleEditorFormatter.class.php'; - -$wgSpecialPages['ResponsibleEditors'] = 'SpecialResponsibleEditors'; - -$aResourceModuleTemplate = array( - 'dependencies' => 'ext.bluespice', - 'localBasePath' => $IP . '/extensions/BlueSpiceExtensions/ResponsibleEditors/resources', - 'remoteExtPath' => 'BlueSpiceExtensions/ResponsibleEditors/resources' -); - -$wgResourceModules['ext.bluespice.responsibleEditors.styles'] = array( - 'styles' => 'bluespice.responsibleEditors.css', - 'position' => 'top' -) + $aResourceModuleTemplate; - -$wgResourceModules['ext.bluespice.responsibleEditors'] = array( - 'scripts' => 'bluespice.responsibleEditors.js', - 'messages' => array( - 'bs-responsibleeditors-availableeditors', - 'bs-responsibleeditors-assignededitors', - 'bs-responsibleeditors-title', - ), -) + $aResourceModuleTemplate; - -$wgResourceModules['ext.bluespice.responsibleEditors.manager'] = array( - 'scripts' => 'bluespice.responsibleEditors.manager.js', - 'dependencies' => array( - 'ext.bluespice.responsibleEditors', - 'ext.bluespice.extjs', - ), - 'messages' => array( - 'bs-responsibleeditors-cbLabelEditorList', - 'bs-responsibleeditors-cbEmptyText', - 'bs-responsibleeditors-loadMaskMessage', - 'bs-responsibleeditors-columnpage', - 'bs-responsibleeditors-columnresponsibleeditor', - 'bs-responsibleeditors-tipEditAssignment', - 'bs-responsibleeditors-tipRemoveAssignement', - 'bs-responsibleeditors-btnDisplayModeText', - 'bs-responsibleeditors-cbnamespacesemptytext', - 'bs-responsibleeditors-confirmNavigationTitle', - 'bs-responsibleeditors-confirmNavigationText', - 'bs-responsibleeditors-columneesponsibleeditornotset', - 'bs-responsibleeditors-pagestorefilter-assigned', - 'bs-responsibleeditors-pagestorefilter-notassigned', - ) -) + $aResourceModuleTemplate; - -$wgResourceModules['ext.bluespice.responsibleEditors.bookshelfPlugin'] = array( - 'scripts' => array( - 'bluespice.responsibleEditors.BookshelfPlugin.js', - ), - 'dependencies' => 'ext.bluespice.responsibleEditors', - 'messages' => array( - 'bs-responsibleeditors-titleeditors', - 'bs-responsibleeditors-cmchangerespeditors', - ) -) + $aResourceModuleTemplate; - -$wgResourceModules['ext.bluespice.responsibleEditors.superList'] = array( - 'scripts' => array( - 'bluespice.responsibleEditors.SuperList.js', - ), - 'dependencies' => array( - 'ext.bluespice.responsibleEditors' - ) -) + $aResourceModuleTemplate; - -$wgAPIModules['bs-responsibleeditorspages-store'] = 'BSApiResponsibleEditorsPagesStore'; -$wgAPIModules['bs-responsibleeditorspossibleeditors-store'] = 'BSApiResponsibleEditorsPossibleEditorsStore'; -$wgAPIModules['bs-responsibleeditorsactivenamespaces-store'] = 'BSApiResponsibleEditorsActiveNamespacesStore'; -$wgAPIModules['bs-responsibleeditors-tasks'] = 'BSApiTasksResponsibleEditors'; +wfLoadExtension( 'BlueSpiceExtensions/ResponsibleEditors' ); //TODO: Revisit when rework dashboards. Find a gerneric portlet store solution $wgAjaxExportList[] = 'ResponsibleEditors::getResponsibleEditorsPortletData'; - -$wgLogTypes[] = 'bs-responsible-editors'; -$wgFilterLogTypes['bs-responsible-editors'] = true; -$wgLogActionsHandlers['bs-responsible-editors/*'] = 'LogFormatter'; - -$wgHooks['LoadExtensionSchemaUpdates'][] = 'ResponsibleEditors::getSchemaUpdates'; $GLOBALS["bssDefinitions"]["_RESPEDITOR"] = array( "id" => "___RESPEDITOR", @@ -105,5 +14,3 @@ "label" => "Responsible editor", "mapping" => "ResponsibleEditors::addPropertyValues" ); - -unset( $aResourceModuleTemplate ); diff --git a/ResponsibleEditors/extension.json b/ResponsibleEditors/extension.json new file mode 100644 index 0000000..284ed66 --- /dev/null +++ b/ResponsibleEditors/extension.json @@ -0,0 +1,115 @@ +{ + "name": "ResponsibleEditors", + "version": "2.27.0", + "url": "https://help.bluespice.com/index.php/ResponsibleEditors", + "author": "Robert Vogel", + "descriptionmsg": "bs-responsibleeditors-desc", + "type": "bluespice", + "bsgExtensions": { + "ResponsibleEditors": { + "className": "ResponsibleEditors", + "extPath": "/BlueSpiceExtensions/ResponsibleEditors" + } + }, + "SpecialPages": { + "ResponsibleEditors": "SpecialResponsibleEditors" + }, + "LogTypes": [ + "bs-responsible-editors" + ], + "FilterLogTypes": { + "bs-responsible-editors": true + }, + "LogActionsHandlers": { + "bs-responsible-editors/*": "LogFormatter" + }, + "APIModules": { + "bs-responsibleeditorspages-store": "BSApiResponsibleEditorsPagesStore", + "bs-responsibleeditorspossibleeditors-store": "BSApiResponsibleEditorsPossibleEditorsStore", + "bs-responsibleeditorsactivenamespaces-store": "BSApiResponsibleEditorsActiveNamespacesStore", + "bs-responsibleeditors-tasks": "BSApiTasksResponsibleEditors" + }, + "MessagesDirs": { + "ResponsibleEditors": [ + "i18n" + ] + }, + "ExtensionMessagesFiles": { + "ResponsibleEditorsAlias": "languages/SpecialResponsibleEditors.alias.php" + }, + "AutoloadClasses": { + "ResponsibleEditors": "ResponsibleEditors.class.php", + "BsResponsibleEditor": "includes/BsResponsibleEditor.php", + "BSApiResponsibleEditorsPagesStore": "includes/api/BSApiResponsibleEditorsPagesStore.php", + "BSApiResponsibleEditorsActiveNamespacesStore": "includes/api/BSApiResponsibleEditorsActiveNamespacesStore.php", + "BSApiResponsibleEditorsPossibleEditorsStore": "includes/api/BSApiResponsibleEditorsPossibleEditorsStore.php", + "BSApiTasksResponsibleEditors": "includes/api/BSApiTasksResponsibleEditors.php", + "SpecialResponsibleEditors": "includes/specials/SpecialResponsibleEditors.class.php", + "ResponsibleEditorFormatter": "includes/ResponsibleEditorFormatter.class.php" + }, + "ResourceModules": { + "ext.bluespice.responsibleEditors.styles": { + "styles": "bluespice.responsibleEditors.css", + "position": "top", + "dependencies": "ext.bluespice" + }, + "ext.bluespice.responsibleEditors": { + "scripts": "bluespice.responsibleEditors.js", + "messages": [ + "bs-responsibleeditors-availableeditors", + "bs-responsibleeditors-assignededitors", + "bs-responsibleeditors-title" + ], + "dependencies": "ext.bluespice" + }, + "ext.bluespice.responsibleEditors.manager": { + "scripts": "bluespice.responsibleEditors.manager.js", + "dependencies": [ + "ext.bluespice.responsibleEditors", + "ext.bluespice.extjs" + ], + "messages": [ + "bs-responsibleeditors-cbLabelEditorList", + "bs-responsibleeditors-cbEmptyText", + "bs-responsibleeditors-loadMaskMessage", + "bs-responsibleeditors-columnpage", + "bs-responsibleeditors-columnresponsibleeditor", + "bs-responsibleeditors-tipEditAssignment", + "bs-responsibleeditors-tipRemoveAssignement", + "bs-responsibleeditors-btnDisplayModeText", + "bs-responsibleeditors-cbnamespacesemptytext", + "bs-responsibleeditors-confirmNavigationTitle", + "bs-responsibleeditors-confirmNavigationText", + "bs-responsibleeditors-columneesponsibleeditornotset", + "bs-responsibleeditors-pagestorefilter-assigned", + "bs-responsibleeditors-pagestorefilter-notassigned" + ] + }, + "ext.bluespice.responsibleEditors.bookshelfPlugin": { + "scripts": [ + "bluespice.responsibleEditors.BookshelfPlugin.js" + ], + "dependencies": "ext.bluespice.responsibleEditors", + "messages": [ + "bs-responsibleeditors-titleeditors", + "bs-responsibleeditors-cmchangerespeditors" + ] + }, + "ext.bluespice.responsibleEditors.superList": { + "scripts": [ + "bluespice.responsibleEditors.SuperList.js" + ], + "dependencies": [ + "ext.bluespice.responsibleEditors" + ] + } + }, + "ResourceFileModulePaths": { + "localBasePath": "/resources", + "remoteExtPath": "BlueSpiceExtensions/ResponsibleEditors/resources" + }, + "Hooks": { + "LoadExtensionSchemaUpdates": "ResponsibleEditors::getSchemaUpdates" + }, + "manifest_version": 1 +} -- To view, visit https://gerrit.wikimedia.org/r/305634 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I854541c28cec622ac48d0523b0b14331c6b52682 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Robert Vogel <vo...@hallowelt.biz> Gerrit-Reviewer: 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