Robert Vogel has submitted this change and it was merged.

Change subject: BSExtensionInfo: Works with new registration of BlueSpice 
extensions
......................................................................


BSExtensionInfo: Works with new registration of BlueSpice extensions

* Note that only these extensions can be shown correctly, which are using the 
new mechanism

Change-Id: Ia62447fbcc6762140c4b05c169aa97b1ebe86ded
---
M ExtensionInfo/includes/ViewExtensionInfoTable.php
1 file changed, 9 insertions(+), 16 deletions(-)

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



diff --git a/ExtensionInfo/includes/ViewExtensionInfoTable.php 
b/ExtensionInfo/includes/ViewExtensionInfoTable.php
index 61147bd..72ffd99 100644
--- a/ExtensionInfo/includes/ViewExtensionInfoTable.php
+++ b/ExtensionInfo/includes/ViewExtensionInfoTable.php
@@ -51,23 +51,16 @@
                global $wgBlueSpiceExtInfo, $wgVersion;
 
                $aExtensionInfo = array();
-               foreach ( $this->mExtensions as $aExtension ) {
-
-                       if ( !isset( $aExtension[EXTINFO::NAME] ) ) continue;
-
-                       $aExtensionInfoArray = array(
-                               'name' => array(
-                                       $aExtension[EXTINFO::NAME],
-                                       $this->getHelpdeskUrl($aExtension)
-                               ),
-                               'version' => ( $aExtension[EXTINFO::VERSION] 
=== 'default' ) ? $wgBlueSpiceExtInfo['version'] : 
$aExtension[EXTINFO::VERSION],
-                               'package' => ( !isset( 
$aExtension[EXTINFO::PACKAGE] ) || $aExtension[EXTINFO::PACKAGE] === 'default' 
) ? $wgBlueSpiceExtInfo['package'] : $aExtension[EXTINFO::PACKAGE],
-                               //'description' => wfMessage( 
$aExtension[EXTINFO::DESCRIPTION] )->plain(), Future use
-                               'description' => wfMessage( 
$aExtension[EXTINFO::DESCRIPTION] )->escaped(),
-                               'status' => ( $aExtension[EXTINFO::STATUS] === 
'default' ) ? $wgBlueSpiceExtInfo['status'] : $aExtension[EXTINFO::STATUS],
+               foreach ( $this->mExtensions as $sExtName => $aExtension ) {
+                       if( empty($sExtName) ) {
+                               continue;
+                       }
+                       $aExtension['name'] = array(
+                               $sExtName,
+                               $this->getHelpdeskUrl($aExtension)
                        );
 
-                       $aExtensionInfo[] = $aExtensionInfoArray;
+                       $aExtensionInfo[] = $aExtension;
                }
 
                RequestContext::getMain()->getOutput()->addJsConfigVars( 
'aExtensionInfo', $aExtensionInfo );
@@ -105,7 +98,7 @@
                //(09.05.2012)PW: added helpdeskurls to mI18n-files
                //$baseUrl = 
BsConfig::get('MW::ExtensionInfo::HelpdeskBaseUrl');
                $baseUrl = 'http://help.blue-spice.org/index.php';
-               $sExtensionName = $aExtensionInfo[EXTINFO::NAME];
+               $sExtensionName = $aExtensionInfo['name'];
                $sUrl = $baseUrl . '/' . $sExtensionName;
                return $sUrl;
        }

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

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

Reply via email to