Ljonka has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/315490

Change subject: move registration to special callback function
......................................................................

move registration to special callback function

Change-Id: I416a9445d1f567f6a4320bde370ec1391dd401a4
---
M BlueSpiceExtensions.php
A extension.json
2 files changed, 28 insertions(+), 9 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/90/315490/1

diff --git a/BlueSpiceExtensions.php b/BlueSpiceExtensions.php
index 2dd1964..9853779 100644
--- a/BlueSpiceExtensions.php
+++ b/BlueSpiceExtensions.php
@@ -7,14 +7,23 @@
  * starting point
  */
 
-if ( file_exists( __DIR__ . 
'/vendor/hallowelt/bluespice-foundation/BlueSpiceFoundation.php' ) ) {
-       require_once __DIR__ . 
'/vendor/hallowelt/bluespice-foundation/BlueSpiceFoundation.php';
-} elseif ( file_exists( __DIR__ . 
'/../../vendor/hallowelt/bluespice-foundation/BlueSpiceFoundation.php' ) ) {
-       require_once __DIR__ . 
'/../../vendor/hallowelt/bluespice-foundation/BlueSpiceFoundation.php';
-}
+class BlueSpiceExtensions{
+       public static function onRegistration(){
 
-if ( file_exists( __DIR__ . '/BlueSpiceExtensions.local.php' ) ) {
-       require_once __DIR__ . '/BlueSpiceExtensions.local.php';
-} else {
-       require_once __DIR__ . '/BlueSpiceExtensions.default.php';
+               ExtensionRegistry::getInstance()->clearQueue();
+               if ( file_exists( __DIR__ . 
'/vendor/hallowelt/bluespice-foundation/BlueSpiceFoundation.php' ) ) {
+                       require_once __DIR__ . 
'/vendor/hallowelt/bluespice-foundation/BlueSpiceFoundation.php';
+               } elseif ( file_exists( __DIR__ . 
'/../../vendor/hallowelt/bluespice-foundation/BlueSpiceFoundation.php' ) ) {
+                       require_once __DIR__ . 
'/../../vendor/hallowelt/bluespice-foundation/BlueSpiceFoundation.php';
+               }
+
+
+               if ( file_exists( __DIR__ . '/BlueSpiceExtensions.local.php' ) 
) {
+                       require_once __DIR__ . '/BlueSpiceExtensions.local.php';
+               } else {
+                       require_once __DIR__ . 
'/BlueSpiceExtensions.default.php';
+               }
+               //now manualy start ExtensionRegistry queue to load later added 
extensions
+               ExtensionRegistry::getInstance()->loadFromQueue();
+       }
 }
diff --git a/extension.json b/extension.json
new file mode 100644
index 0000000..b3008c8
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,10 @@
+{
+  "name": "BlueSpiceExtensions",
+       "version": "2.27.1",
+       "url": "https://www.mediawiki.org/wiki/BlueSpice";,
+       "authors": ["Hallo Welt! GmbH"],
+  "AutoloadClasses":{
+    "BlueSpiceExtensions":"./BlueSpiceExtensions.php"
+  },
+  "callback": "BlueSpiceExtensions::onRegistration"
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I416a9445d1f567f6a4320bde370ec1391dd401a4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Ljonka <l.verhovs...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to