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

Change subject: BSExtensions: Used callback in extension.json
......................................................................


BSExtensions: Used callback in extension.json

Change-Id: I20b23ef9dbe79de448610148b699b775ce10d02d
---
M Avatars/Avatars.class.php
M Avatars/Avatars.setup.php
M Avatars/extension.json
M Blog/Blog.class.php
M Blog/Blog.setup.php
M Blog/extension.json
M ExtendedSearch/ExtendedSearch.class.php
M ExtendedSearch/ExtendedSearch.setup.php
M ExtendedSearch/extension.json
M Flexiskin/Flexiskin.class.php
M Flexiskin/Flexiskin.setup.php
M Flexiskin/extension.json
M NamespaceManager/NamespaceManager.class.php
M NamespaceManager/NamespaceManager.setup.php
M NamespaceManager/extension.json
M PageAssignments/PageAssignments.class.php
M PageAssignments/PageAssignments.setup.php
M PageAssignments/extension.json
M PageTemplates/PageTemplates.setup.php
M PageTemplates/PageTemplatesAdmin.class.php
M PermissionManager/PermissionManager.class.php
M PermissionManager/PermissionManager.setup.php
M PermissionManager/extension.json
M SecureFileStore/SecureFileStore.class.php
M SecureFileStore/SecureFileStore.setup.php
M SecureFileStore/extension.json
M UEModulePDF/UEModulePDF.class.php
M UEModulePDF/UEModulePDF.setup.php
M UEModulePDF/extension.json
M WikiAdmin/WikiAdmin.class.php
M WikiAdmin/WikiAdmin.setup.php
M WikiAdmin/extension.json
32 files changed, 240 insertions(+), 277 deletions(-)

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



diff --git a/Avatars/Avatars.class.php b/Avatars/Avatars.class.php
index ded435b..9501a3c 100644
--- a/Avatars/Avatars.class.php
+++ b/Avatars/Avatars.class.php
@@ -59,6 +59,21 @@
        }
 
        /**
+        * extension.json callback
+        * @global array $wgForeignFileRepos
+        */
+       public static function onRegistration() {
+               global $wgForeignFileRepos;
+               $wgForeignFileRepos[] = array(
+                       'class' => 'FSRepo',
+                       'name' => 'Avatars',
+                       'directory' => BS_DATA_DIR . '/Avatars/',
+                       'hashLevels' => 0,
+                       'url' => BS_DATA_PATH . '/Avatars',
+               );
+       }
+
+       /**
         * Adds module
         * @param OutputPage $out
         * @param SkinTemplate $skin
diff --git a/Avatars/Avatars.setup.php b/Avatars/Avatars.setup.php
index 5aa37a8..12278f4 100644
--- a/Avatars/Avatars.setup.php
+++ b/Avatars/Avatars.setup.php
@@ -1,11 +1,3 @@
 <?php
 
-wfLoadExtension( 'BlueSpiceExtensions/Avatars' );
-
-$wgForeignFileRepos[] = array(
-       'class' => 'FSRepo',
-       'name' => 'Avatars',
-       'directory' => BS_DATA_DIR . '/Avatars/',
-       'hashLevels' => 0,
-       'url' => BS_DATA_PATH . '/Avatars',
-);
\ No newline at end of file
+wfLoadExtension( 'BlueSpiceExtensions/Avatars' );
\ No newline at end of file
diff --git a/Avatars/extension.json b/Avatars/extension.json
index d589a19..866cbc3 100644
--- a/Avatars/extension.json
+++ b/Avatars/extension.json
@@ -11,6 +11,7 @@
                        "extPath": "/BlueSpiceExtensions/Avatars"
                }
        },
+       "callback": "Avatars::onRegistration",
        "APIModules": {
                "bs-avatars-tasks": "BSApiAvatarsTasks"
        },
diff --git a/Blog/Blog.class.php b/Blog/Blog.class.php
index 5c6c55d..442f2ce 100644
--- a/Blog/Blog.class.php
+++ b/Blog/Blog.class.php
@@ -92,6 +92,13 @@
        }
 
        /**
+        * extension.json callback
+        */
+       public static function onRegistration() {
+               BsExtensionManager::registerNamespace( 'Blog', 2 );
+       }
+
+       /**
         * Adds entry to navigation sites
         * @global string $wgScriptPath
         * @param array $aNavigationSites
diff --git a/Blog/Blog.setup.php b/Blog/Blog.setup.php
index b89293d..371b101 100644
--- a/Blog/Blog.setup.php
+++ b/Blog/Blog.setup.php
@@ -1,4 +1,2 @@
 <?php
-wfLoadExtension( 'BlueSpiceExtensions/Blog' );
-
-BsExtensionManager::registerNamespace( 'Blog', 2 );
\ No newline at end of file
+wfLoadExtension( 'BlueSpiceExtensions/Blog' );
\ No newline at end of file
diff --git a/Blog/extension.json b/Blog/extension.json
index 11d7afd..89e6027 100644
--- a/Blog/extension.json
+++ b/Blog/extension.json
@@ -14,6 +14,7 @@
                        "extPath": "/BlueSpiceExtensions/Blog"
                }
        },
+       "callback": "Blog::onRegistration",
        "SpecialPages": {
                "Blog": "SpecialBlog"
        },
diff --git a/ExtendedSearch/ExtendedSearch.class.php 
b/ExtendedSearch/ExtendedSearch.class.php
index 1bf0fef..0c13b21 100644
--- a/ExtendedSearch/ExtendedSearch.class.php
+++ b/ExtendedSearch/ExtendedSearch.class.php
@@ -121,6 +121,18 @@
        }
 
        /**
+        * extension.json callback
+        * @global array $wgAjaxExportList
+        */
+       public static function onRegistration() {
+               global $wgAjaxExportList;
+               $wgAjaxExportList[] = 'ExtendedSearch::getRequestJson';
+               $wgAjaxExportList[] = 'ExtendedSearchBase::getAutocompleteData';
+               $wgAjaxExportList[] = 
'ExtendedSearchBase::getRecentSearchTerms';
+               $wgAjaxExportList[] = 'ExtendedSearchAdmin::getProgressBar';
+       }
+
+       /**
         * Hook-Handler for Hook 'OpenSearchUrls'
         * @param array ยง$aUrls array of urls for opensearch
         * @return boolean Always true
diff --git a/ExtendedSearch/ExtendedSearch.setup.php 
b/ExtendedSearch/ExtendedSearch.setup.php
index 063ca2b..3f6ddc7 100644
--- a/ExtendedSearch/ExtendedSearch.setup.php
+++ b/ExtendedSearch/ExtendedSearch.setup.php
@@ -1,9 +1,2 @@
 <?php
-wfLoadExtension( 'BlueSpiceExtensions/ExtendedSearch' );
-
-$wgAjaxExportList[] = 'ExtendedSearch::getRequestJson';
-$wgAjaxExportList[] = 'ExtendedSearchBase::getAutocompleteData';
-$wgAjaxExportList[] = 'ExtendedSearchBase::getRecentSearchTerms';
-
-$wgAjaxExportList[] = 'ExtendedSearchAdmin::getProgressBar';
-
+wfLoadExtension( 'BlueSpiceExtensions/ExtendedSearch' );
\ No newline at end of file
diff --git a/ExtendedSearch/extension.json b/ExtendedSearch/extension.json
index b7381a8..60ff404 100644
--- a/ExtendedSearch/extension.json
+++ b/ExtendedSearch/extension.json
@@ -17,6 +17,7 @@
                        "extPath": "/BlueSpiceExtensions/ExtendedSearch"
                }
        },
+       "callback": "ExtendedSearch::onRegistration",
        "SpecialPages": {
                "SpecialExtendedSearch": "SpecialExtendedSearch",
                "ExtendedSearchAdmin": "SpecialExtendedSearchAdmin"
diff --git a/Flexiskin/Flexiskin.class.php b/Flexiskin/Flexiskin.class.php
index c6ff454..edb4766 100755
--- a/Flexiskin/Flexiskin.class.php
+++ b/Flexiskin/Flexiskin.class.php
@@ -63,6 +63,21 @@
                wfProfileOut( 'BS::' . __METHOD__ );
        }
 
+       /**
+        * extension.json callback
+        * @global array $wgForeignFileRepos
+        */
+       public static function onRegistration() {
+               global $wgForeignFileRepos;
+               $wgForeignFileRepos[] = array(
+                       'class' => 'FSRepo',
+                       'name' => 'Flexiskin',
+                       'directory' => BS_DATA_DIR . '/Flexiskin/',
+                       'hashLevels' => 0,
+                       'url' => BS_DATA_PATH . '/Flexiskin',
+               );
+       }
+
        public function runPreferencePlugin( $sAdapterName, BsConfig $oVariable 
) {
                if ( substr( $oVariable->getKey(), 0, 13 ) != "MW::Flexiskin" ){
                        return array();
diff --git a/Flexiskin/Flexiskin.setup.php b/Flexiskin/Flexiskin.setup.php
index 95e48a4..25c5034 100755
--- a/Flexiskin/Flexiskin.setup.php
+++ b/Flexiskin/Flexiskin.setup.php
@@ -1,10 +1,2 @@
 <?php
-wfLoadExtension( 'BlueSpiceExtensions/Flexiskin' );
-
-$wgForeignFileRepos[] = array(
-       'class' => 'FSRepo',
-       'name' => 'Flexiskin',
-       'directory' => BS_DATA_DIR . '/Flexiskin/',
-       'hashLevels' => 0,
-       'url' => BS_DATA_PATH . '/Flexiskin',
-);
\ No newline at end of file
+wfLoadExtension( 'BlueSpiceExtensions/Flexiskin' );
\ No newline at end of file
diff --git a/Flexiskin/extension.json b/Flexiskin/extension.json
index 591c229..2e747d3 100644
--- a/Flexiskin/extension.json
+++ b/Flexiskin/extension.json
@@ -13,6 +13,7 @@
                        "extPath": "/BlueSpiceExtensions/Flexiskin"
                }
        },
+       "callback": "Flexiskin::onRegistration",
        "APIModules": {
                "bs-flexiskin-tasks": "BSApiFlexiskinTasks",
                "bs-flexiskin-store": "BSApiFlexiskinStore",
diff --git a/NamespaceManager/NamespaceManager.class.php 
b/NamespaceManager/NamespaceManager.class.php
index 67a8c07..54ef2f2 100644
--- a/NamespaceManager/NamespaceManager.class.php
+++ b/NamespaceManager/NamespaceManager.class.php
@@ -85,6 +85,16 @@
        }
 
        /**
+        * extension.json callback
+        * @global array $bsgConfigFiles
+        */
+       public static function onRegistration() {
+               global $bsgConfigFiles;
+               $bsgConfigFiles['NamespaceManager']
+                       = BSCONFIGDIR . DS . 'nm-settings.php';
+       }
+
+       /**
        * Add the sql file to database by executing the update.php
        * @global type $wgDBtype
        * @global array $wgExtNewTables
diff --git a/NamespaceManager/NamespaceManager.setup.php 
b/NamespaceManager/NamespaceManager.setup.php
index 0434fd3..f90284f 100644
--- a/NamespaceManager/NamespaceManager.setup.php
+++ b/NamespaceManager/NamespaceManager.setup.php
@@ -1,4 +1,2 @@
 <?php
-wfLoadExtension( 'BlueSpiceExtensions/NamespaceManager' );
-
-$bsgConfigFiles['NamespaceManager'] = BSCONFIGDIR . DS . 'nm-settings.php';
\ No newline at end of file
+wfLoadExtension( 'BlueSpiceExtensions/NamespaceManager' );
\ No newline at end of file
diff --git a/NamespaceManager/extension.json b/NamespaceManager/extension.json
index be89497..b92b343 100644
--- a/NamespaceManager/extension.json
+++ b/NamespaceManager/extension.json
@@ -16,6 +16,7 @@
                        "extPath": "/BlueSpiceExtensions/NamespaceManager"
                }
        },
+       "callback": "NamespaceManager::onRegistration",
        "LogTypes": [
                "bs-namespace-manager"
        ],
diff --git a/PageAssignments/PageAssignments.class.php 
b/PageAssignments/PageAssignments.class.php
index 8255d8e..ba969c6 100644
--- a/PageAssignments/PageAssignments.class.php
+++ b/PageAssignments/PageAssignments.class.php
@@ -20,6 +20,25 @@
                        array( 'sysop' )
                );
        }
+
+       /**
+        * extension.json callback
+        */
+       public static function onRegistration() {
+               $GLOBALS['bsgPageAssigneeTypes'] = array(
+                       'user' => 'BSAssignableUser',
+                       'group' => 'BSAssignableGroup'
+               );
+               $GLOBALS['wgExtensionFunctions'][] = function() {
+                       PageAssignmentsNotificationHooks::setup();
+               };
+               if( !isset( 
$GLOBALS['bsgDefaultAssignedUsersAdditionalPermissions'] ) ) {
+                       
$GLOBALS['bsgDefaultAssignedUsersAdditionalPermissions'] = array(
+                               'read',
+                       );
+               }
+       }
+
        /**
         *
         * @param Title $oTitle
diff --git a/PageAssignments/PageAssignments.setup.php 
b/PageAssignments/PageAssignments.setup.php
index 0e3f892..e1dfb46 100644
--- a/PageAssignments/PageAssignments.setup.php
+++ b/PageAssignments/PageAssignments.setup.php
@@ -1,18 +1,3 @@
 <?php
 
-if (!defined('MEDIAWIKI')) {
-       die('This is an extension to the MediaWiki software and cannot be used 
standalone.');
-}
-$bsgPageAssigneeTypes = array(
-       'user' => 'BSAssignableUser',
-       'group' => 'BSAssignableGroup'
-);
-wfLoadExtension( 'BlueSpiceExtensions/PageAssignments' );
-$wgExtensionFunctions[] = function() {
-       PageAssignmentsNotificationHooks::setup();
-};
-if( !isset( $bsgDefaultAssignedUsersAdditionalPermissions ) ) {
-       $bsgDefaultAssignedUsersAdditionalPermissions = array(
-               'read',
-       );
-}
\ No newline at end of file
+wfLoadExtension( 'BlueSpiceExtensions/PageAssignments' );
\ No newline at end of file
diff --git a/PageAssignments/extension.json b/PageAssignments/extension.json
index 29ee3e9..e3ee7b8 100644
--- a/PageAssignments/extension.json
+++ b/PageAssignments/extension.json
@@ -14,6 +14,7 @@
                        "extPath": "/BlueSpiceExtensions/PageAssignments"
                }
        },
+       "callback": "PageAssignments::onRegistration",
        "DefaultUserOptions": {
                "echo-subscriptions-web-bs-pageassignments-action-cat": true,
                "echo-subscriptions-email-bs-pageassignments-action-cat": true
diff --git a/PageTemplates/PageTemplates.setup.php 
b/PageTemplates/PageTemplates.setup.php
index fb642d6..2e9f558 100644
--- a/PageTemplates/PageTemplates.setup.php
+++ b/PageTemplates/PageTemplates.setup.php
@@ -1,6 +1,2 @@
 <?php
-wfLoadExtension( 'BlueSpiceExtensions/PageTemplates' );
-
-$wgAjaxExportList[] = 'PageTemplatesAdmin::doEditTemplate';
-$wgAjaxExportList[] = 'PageTemplatesAdmin::doDeleteTemplate';
-$wgAjaxExportList[] = 'PageTemplatesAdmin::doDeleteTemplates';
+wfLoadExtension( 'BlueSpiceExtensions/PageTemplates' );
\ No newline at end of file
diff --git a/PageTemplates/PageTemplatesAdmin.class.php 
b/PageTemplates/PageTemplatesAdmin.class.php
index c745ce5..5b47d51 100644
--- a/PageTemplates/PageTemplatesAdmin.class.php
+++ b/PageTemplates/PageTemplatesAdmin.class.php
@@ -36,106 +36,4 @@
                $this->oExtension = BsExtensionManager::getExtension( 
'PageTemplates' );
                wfProfileOut( 'BS::'.__METHOD__ );
        }
-
-       /**
-        * Creates or changes a template
-        * @return bool allow other hooked methods to be executed. Always true.
-        */
-       public static function doEditTemplate( $iOldId, $sTemplateName, 
$sLabel, $sDesc, $iTargetNs ) {
-               if ( wfReadOnly() ) {
-                       global $wgReadOnly;
-                       return json_encode( array(
-                               'success' => false,
-                               'errors' => array( wfMessage( 'bs-readonly', 
$wgReadOnly )->plain() ) // errors not messages otherwise no message will be 
displayed
-                       ) );
-               }
-               if ( BsCore::checkAccessAdmission( 'wikiadmin' ) === false ) 
return true;
-
-               $aAnswer = array(
-                       'success' => true,
-                       'errors' => array(),
-                       'message' => array()
-               );
-
-               if ( empty( $sDesc ) ) $sDesc = ' ';
-
-               // TODO RBV (18.05.11 09:19): Use validators
-               if ( strlen( $sDesc ) >= 255 ) {
-                       $aAnswer['success'] = false;
-                       $aAnswer['errors']['desc'] = wfMessage( 
'bs-pagetemplates-tpl-desc-toolong' )->plain();
-               }
-
-               if ( strlen( $sLabel ) >= 255 ) {
-                       $aAnswer['success'] = false;
-                       $aAnswer['errors']['label'] = wfMessage( 
'bs-pagetemplates-tpl-label-toolong' )->plain();
-               }
-
-               if ( strlen( $sLabel ) == 0 ) {
-                       $aAnswer['success'] = false;
-                       $aAnswer['errors']['label'] = wfMessage( 
'bs-pagetemplates-tpl-label-empty' )->plain();
-               }
-
-               if ( strlen( $sTemplateName ) >= 255 ) {
-                       $aAnswer['success'] = false;
-                       $aAnswer['errors']['templateName'] = wfMessage( 
'bs-pagetemplates-tpl-name-toolong' )->plain();
-               }
-
-               if ( strlen( $sTemplateName ) == 0 ) {
-                       $aAnswer['success'] = false;
-                       $aAnswer['errors']['templateName'] = wfMessage( 
'bs-pagetemplates-tpl-name-empty' )->plain();
-               }
-
-               $oDbw = wfGetDB( DB_MASTER );
-
-               $oTitle = Title::newFromText( $sTemplateName );
-               // This is the add template part
-               if ( empty( $iOldId ) ) {
-                       if ( $aAnswer['success'] === true ) {
-                               $oDbw->insert(
-                                       'bs_pagetemplate',
-                                       array(
-                                               'pt_label' => $sLabel,
-                                               'pt_desc' => $sDesc,
-                                               'pt_template_title' => 
$sTemplateName,
-                                               'pt_template_namespace' => 
$oTitle->getNamespace(),
-                                               'pt_target_namespace' => 
$iTargetNs,
-                                               'pt_sid' => 0,
-                                       ));
-                               $aAnswer['message'][] = wfMessage( 
'bs-pagetemplates-tpl-added' )->plain();
-                       }
-               // and here we have edit template
-               } else {
-                       $rRes = $oDbw->select( 'bs_pagetemplate', 'pt_id', 
array( 'pt_id' => $iOldId ) );
-                       $iNumRow = $oDbw->numRows( $rRes );
-                       if ( !$iNumRow ) {
-                               $aAnswer['success'] = false;
-                               $aAnswer['errors'][] = wfMessage( 
'bs-pagetemplates-nooldtpl' )->plain();
-                       }
-
-                       if ( $aAnswer['success'] === true ) {
-                               //$oDbw = wfGetDB( DB_MASTER );
-                               $rRes = $oDbw->update( 'bs_pagetemplate',
-                                               array( 'pt_id' => $iOldId,
-                                                       'pt_label' => $sLabel,
-                                                       'pt_desc' => $sDesc,
-                                                       'pt_template_title' => 
$sTemplateName,
-                                                       'pt_template_namespace' 
=> $oTitle->getNamespace(),
-                                                       'pt_target_namespace' 
=> $iTargetNs
-                                                       ),
-                                               array( 'pt_id' => $iOldId )
-                                       );
-
-                               if ( $rRes === false ) {
-                                       $aAnswer['success'] = false;
-                                       $aAnswer['errors'][] = wfMessage( 
'bs-pagetemplates-dberror' )->plain();
-                               }
-                       }
-
-                       if ( $aAnswer['success'] ) {
-                               $aAnswer['message'][] = wfMessage( 
'bs-pagetemplates-tpl-edited' )->plain();
-                       }
-               }
-
-               return json_encode( $aAnswer );
-       }
 }
\ No newline at end of file
diff --git a/PermissionManager/PermissionManager.class.php 
b/PermissionManager/PermissionManager.class.php
index 104ddd0..a774721 100644
--- a/PermissionManager/PermissionManager.class.php
+++ b/PermissionManager/PermissionManager.class.php
@@ -124,6 +124,111 @@
        }
 
        /**
+        * extension.json callback
+        */
+       public static function onRegistration() {
+               if( !isset( $GLOBALS['bsgPermissionManagerDefaultTemplates'] ) 
) {
+                       $GLOBALS['bsgPermissionManagerDefaultTemplates'] = 
array();
+               }
+
+               $GLOBALS['bsgConfigFiles']['PermissionManager']
+                       = BSCONFIGDIR . DS . 'pm-settings.php';
+
+               $GLOBALS['bsgPermissionManagerDefaultTemplates'] = array(
+                       //Not namespace specific
+                       
'bs-permissionmanager-default-template-read-general-title' => array(
+                               //BlueSpice
+                               //TODO: Move to other extensions
+                               'files',
+                               'viewfiles',
+                               'searchfiles'
+
+                       ),
+
+                       'bs-permissionmanager-default-template-read-title' => 
array(
+                               //MediaWiki standard
+                               'read',
+
+                               //BlueSpice
+                               //TODO: Move to other extensions
+                               'readshoutbox',
+                               'universalexport-export',
+                               'universalexport-export-with-attachments'
+
+                       ),
+
+                       //Not namespace specific
+                       
'bs-permissionmanager-default-template-edit-general-title' => array(
+                               //MediaWiki standard
+                               'movefile',
+                               'move-rootuserpages',
+                               'upload',
+                                       'reupload',
+                                       'reupload-own',
+                                       'reupload-shared',
+                                       'upload_by_url',
+                               'writeapi',
+
+                               //BlueSpice
+                               //TODO: Move to other extensions
+                               'writeshoutbox'
+                       ),
+
+                       'bs-permissionmanager-default-template-edit-title' => 
array(
+                               //MediaWiki standard
+                               'edit',
+                               'create',
+                               'createtalk',
+                               'move',
+                                       'move-subbpages',
+                               'delete',
+
+                               //BlueSpice
+                               //TODO: Move to other extensions
+                               'writeshoutbox'
+                       ),
+
+                       'bs-permissionmanager-default-template-admin-title' => 
array(
+                               //MediaWiki standard
+                               'bigdelete',
+                               'browsearchive',
+                               'createaccount',
+                               'deletedtext',
+                               'deletedhistory',
+                               'protect',
+                               'editprotected',
+                               'block',
+                               'rollback',
+                               'import',
+                               'userrights',
+
+                               //BlueSpice
+                               //TODO: Move to other extensions
+                               'wikiadmin',
+                                       'editadmin', // still in use?
+                                       'useradmin' // still in use?
+                       ),
+
+                       'bs-permissionmanager-default-template-quality-title' 
=> array(
+                               //MediaWiki FlaggedRevs
+                               //TODO: Move to other extensions
+                               'autoreview',
+                               'review',
+                               'unreviewdpages',
+                               'validate',
+
+                               //BlueSpice
+                               //TODO: Move to other extensions
+                               'responsibleeditors-changeresponsibility',
+                               'responsibleeditors-takeresponsibility',
+                               'responsibleeditors-viewspecialpage',
+                               'workflowview',
+                                       'workflowedit', // still in use?
+                       )
+               ) + $GLOBALS['bsgPermissionManagerDefaultTemplates'];
+       }
+
+       /**
         * Hook-Handler for Hook 'LoadExtensionSchemaUpdates'
         * @param object $updater Updater
         * @return boolean Always true
diff --git a/PermissionManager/PermissionManager.setup.php 
b/PermissionManager/PermissionManager.setup.php
index 91185b9..1930c95 100644
--- a/PermissionManager/PermissionManager.setup.php
+++ b/PermissionManager/PermissionManager.setup.php
@@ -1,101 +1,2 @@
 <?php
-wfLoadExtension( 'BlueSpiceExtensions/PermissionManager' );
-
-if( !isset( $bsgPermissionManagerDefaultTemplates ) ) {
-       $bsgPermissionManagerDefaultTemplates = array();
-}
-
-$bsgConfigFiles['PermissionManager'] = BSCONFIGDIR . DS . 'pm-settings.php';
-
-$bsgPermissionManagerDefaultTemplates = array(
-       //Not namespace specific
-       'bs-permissionmanager-default-template-read-general-title' => array(
-               //BlueSpice
-               //TODO: Move to other extensions
-               'files',
-               'viewfiles',
-               'searchfiles'
-
-       ),
-
-       'bs-permissionmanager-default-template-read-title' => array(
-               //MediaWiki standard
-               'read',
-
-               //BlueSpice
-               //TODO: Move to other extensions
-               'readshoutbox',
-               'universalexport-export',
-               'universalexport-export-with-attachments'
-
-       ),
-
-       //Not namespace specific
-       'bs-permissionmanager-default-template-edit-general-title' => array(
-               //MediaWiki standard
-               'movefile',
-               'move-rootuserpages',
-               'upload',
-                       'reupload',
-                       'reupload-own',
-                       'reupload-shared',
-                       'upload_by_url',
-               'writeapi',
-
-               //BlueSpice
-               //TODO: Move to other extensions
-               'writeshoutbox'
-       ),
-
-       'bs-permissionmanager-default-template-edit-title' => array(
-               //MediaWiki standard
-               'edit',
-               'create',
-               'createtalk',
-               'move',
-                       'move-subbpages',
-               'delete',
-
-               //BlueSpice
-               //TODO: Move to other extensions
-               'writeshoutbox'
-       ),
-
-       'bs-permissionmanager-default-template-admin-title' => array(
-               //MediaWiki standard
-               'bigdelete',
-               'browsearchive',
-               'createaccount',
-               'deletedtext',
-               'deletedhistory',
-               'protect',
-               'editprotected',
-               'block',
-               'rollback',
-               'import',
-               'userrights',
-
-               //BlueSpice
-               //TODO: Move to other extensions
-               'wikiadmin',
-                       'editadmin', // still in use?
-                       'useradmin' // still in use?
-       ),
-
-       'bs-permissionmanager-default-template-quality-title' => array(
-               //MediaWiki FlaggedRevs
-               //TODO: Move to other extensions
-               'autoreview',
-               'review',
-               'unreviewdpages',
-               'validate',
-
-               //BlueSpice
-               //TODO: Move to other extensions
-               'responsibleeditors-changeresponsibility',
-               'responsibleeditors-takeresponsibility',
-               'responsibleeditors-viewspecialpage',
-               'workflowview',
-                       'workflowedit', // still in use?
-       )
-) + $bsgPermissionManagerDefaultTemplates;
\ No newline at end of file
+wfLoadExtension( 'BlueSpiceExtensions/PermissionManager' );
\ No newline at end of file
diff --git a/PermissionManager/extension.json b/PermissionManager/extension.json
index 2536f5f..a3fef57 100644
--- a/PermissionManager/extension.json
+++ b/PermissionManager/extension.json
@@ -15,6 +15,7 @@
                        "extPath": "/BlueSpiceExtensions/PermissionManager"
                }
        },
+       "callback": "PermissionManager::onRegistration",
        "ExtensionFunctions": [
                "PermissionManager::setupLockmodePermissions"
        ],
diff --git a/SecureFileStore/SecureFileStore.class.php 
b/SecureFileStore/SecureFileStore.class.php
index 7aa257b..35633cc 100644
--- a/SecureFileStore/SecureFileStore.class.php
+++ b/SecureFileStore/SecureFileStore.class.php
@@ -66,6 +66,13 @@
                wfProfileOut( 'BS::'.__METHOD__ );
        }
 
+       /**
+        * extension.json callback
+        */
+       public static function onRegistration() {
+               $GLOBALS["wgAjaxExportList"][] = "SecureFileStore::getFile";
+       }
+
        public function onSiteNoticeAfter( &$siteNotice ) {
                $siteNotice = SecureFileStore::secureFilesInText( $siteNotice );
                return true;
diff --git a/SecureFileStore/SecureFileStore.setup.php 
b/SecureFileStore/SecureFileStore.setup.php
index f3b9dec..ecd4b89 100644
--- a/SecureFileStore/SecureFileStore.setup.php
+++ b/SecureFileStore/SecureFileStore.setup.php
@@ -1,4 +1,2 @@
 <?php
-wfLoadExtension( 'BlueSpiceExtensions/SecureFileStore' );
-
-$GLOBALS["wgAjaxExportList"][] = "SecureFileStore::getFile";
\ No newline at end of file
+wfLoadExtension( 'BlueSpiceExtensions/SecureFileStore' );
\ No newline at end of file
diff --git a/SecureFileStore/extension.json b/SecureFileStore/extension.json
index 03e345f..c8c77e9 100644
--- a/SecureFileStore/extension.json
+++ b/SecureFileStore/extension.json
@@ -15,6 +15,7 @@
                        "extPath": "/BlueSpiceExtensions/SecureFileStore"
                }
        },
+       "callback": "SecureFileStore::onRegistration",
        "MessagesDirs": {
                "SecureFileStore": [
                        "i18n"
diff --git a/UEModulePDF/UEModulePDF.class.php 
b/UEModulePDF/UEModulePDF.class.php
index cfaa805..f2c6183 100644
--- a/UEModulePDF/UEModulePDF.class.php
+++ b/UEModulePDF/UEModulePDF.class.php
@@ -58,6 +58,28 @@
        }
 
        /**
+        * extension.json callback
+        */
+       public static function onRegistration() {
+               /**
+                * Allows modification for CURL request. E.g. setting an CA 
file for
+                * HTTPS
+                */
+               $GLOBALS['bsgUEModulePDFCURLOptions'] = array();
+
+               /**
+                * This value is considered when asseta are being uploaded to 
the PDF
+                * service
+                */
+               $GLOBALS['bsgUEModulePDFUploadThreshold'] = 50 * 1024 * 1024;
+
+               // Remove if minimal system requirements of MW changes to PHP 
<= 5.5
+               if( !defined( 'CURLOPT_SAFE_UPLOAD' ) ) {
+                       define( 'CURLOPT_SAFE_UPLOAD', -1 );
+               }
+       }
+
+       /**
         * Sets parameters for more complex options in preferences
         * @param string $sAdapterName Name of the adapter, e.g. MW
         * @param BsConfig $oVariable Instance of variable
diff --git a/UEModulePDF/UEModulePDF.setup.php 
b/UEModulePDF/UEModulePDF.setup.php
index 95b24a7..54447f9 100644
--- a/UEModulePDF/UEModulePDF.setup.php
+++ b/UEModulePDF/UEModulePDF.setup.php
@@ -1,17 +1,2 @@
 <?php
-wfLoadExtension( 'BlueSpiceExtensions/UEModulePDF' );
-
-/**
- * Allows modification for CURL request. E.g. setting an CA file for HTTPS
- */
-$bsgUEModulePDFCURLOptions = array();
-
-/**
- * This value is considered when asseta are being uploaded to the PDF service
- */
-$bsgUEModulePDFUploadThreshold = 50 * 1024 * 1024;
-
-// Remove if minimal system requirements of MW changes to PHP <= 5.5
-if( !defined( 'CURLOPT_SAFE_UPLOAD' ) ) {
-       define( 'CURLOPT_SAFE_UPLOAD', -1 );
-}
\ No newline at end of file
+wfLoadExtension( 'BlueSpiceExtensions/UEModulePDF' );
\ No newline at end of file
diff --git a/UEModulePDF/extension.json b/UEModulePDF/extension.json
index 666a1fc..dbe4ed2 100644
--- a/UEModulePDF/extension.json
+++ b/UEModulePDF/extension.json
@@ -10,6 +10,7 @@
                        "extPath": "/BlueSpiceExtensions/UEModulePDF"
                }
        },
+       "callback": "UEModulePDF::onRegistration",
        "MessagesDirs": {
                "UEModulePDF": [
                        "i18n"
diff --git a/WikiAdmin/WikiAdmin.class.php b/WikiAdmin/WikiAdmin.class.php
index 879793f..b1b8cc3 100644
--- a/WikiAdmin/WikiAdmin.class.php
+++ b/WikiAdmin/WikiAdmin.class.php
@@ -165,6 +165,13 @@
        }
 
        /**
+        * extension.json callback
+        */
+       public static function onRegistration() {
+               $GLOBALS['wgExtensionFunctions'][] = 'WikiAdmin::loadModules';
+       }
+
+       /**
         * Adds WikiAdmin tab to main navigation
         * @param array $aViews
         * @param User $oUser
diff --git a/WikiAdmin/WikiAdmin.setup.php b/WikiAdmin/WikiAdmin.setup.php
index b911bbf..aa20d77 100644
--- a/WikiAdmin/WikiAdmin.setup.php
+++ b/WikiAdmin/WikiAdmin.setup.php
@@ -1,4 +1,2 @@
 <?php
-wfLoadExtension( 'BlueSpiceExtensions/WikiAdmin' );
-
-$wgExtensionFunctions[] = 'WikiAdmin::loadModules';
\ No newline at end of file
+wfLoadExtension( 'BlueSpiceExtensions/WikiAdmin' );
\ No newline at end of file
diff --git a/WikiAdmin/extension.json b/WikiAdmin/extension.json
index 60db2d8..3f66b7f 100644
--- a/WikiAdmin/extension.json
+++ b/WikiAdmin/extension.json
@@ -16,6 +16,7 @@
                        "extPath": "/BlueSpiceExtensions/WikiAdmin"
                }
        },
+       "callback": "WikiAdmin::onRegistration",
        "SpecialPages": {
                "WikiAdmin": "SpecialWikiAdmin"
        },

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I20b23ef9dbe79de448610148b699b775ce10d02d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Pwirth <wi...@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: 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

Reply via email to