Robert Vogel has uploaded a new change for review.

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

Change subject: ExtensionManager: Invoke autoloader if possible
......................................................................

ExtensionManager: Invoke autoloader if possible

In future we are going to remove the 'require' statements completely and
only use autoloader. Until this we just priotize autoloader.

Change-Id: I4d3d0e5e8cfda26b167989a98225edece8a978bd
---
M includes/ExtensionManager.class.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation 
refs/changes/61/275761/1

diff --git a/includes/ExtensionManager.class.php 
b/includes/ExtensionManager.class.php
index a44483a..ca6dbd8 100644
--- a/includes/ExtensionManager.class.php
+++ b/includes/ExtensionManager.class.php
@@ -85,6 +85,11 @@
                $path = "$IP/extensions/BlueSpiceExtensions";
 
                foreach ( self::$prRegisteredExtensions as $extension => 
$attributes ) {
+                               //if possible, load by autoloader
+                               if( class_exists( 'Bs' . $extension ) || 
class_exists( $extension ) ) {
+                                       continue;
+                               }
+
                                if ( $attributes['baseDir'] != 'ext' ) {
                                        require( $attributes['baseDir'] . DS . 
$extension . '.class.php' );
                                } else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d3d0e5e8cfda26b167989a98225edece8a978bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel <vo...@hallowelt.biz>

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

Reply via email to