Pwirth has uploaded a new change for review.

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

Change subject: PermissionManager: Merged fix for un-editable new groups
......................................................................

PermissionManager: Merged fix for un-editable new groups

* I3eda3f55d1993d5fea41c64a7d4d59e02d47df64

Change-Id: I2f09958cb97186b6e700e1b90e265c4ebaf5273e
---
M PermissionManager/PermissionManager.class.php
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/PermissionManager/PermissionManager.class.php 
b/PermissionManager/PermissionManager.class.php
index b752f2c..89b423d 100644
--- a/PermissionManager/PermissionManager.class.php
+++ b/PermissionManager/PermissionManager.class.php
@@ -305,6 +305,13 @@
 
                wfRunHooks('BsPermissionManager::beforeLoadPermissions', 
array(&$aJsVars));
 
+               //Make sure a new group without any explicit permissions is 
converted into an object!
+               //Without any key => value it would be converted into an empty 
array.
+               foreach( $aJsVars['bsPermissionManagerGroupPermissions'] as 
$sGroup => $aPermissions ) {
+                       if( !empty($aPermissions) ) continue;
+                       
$aJsVars['bsPermissionManagerGroupPermissions'][$sGroup] = (object) array();
+               }
+
                $this->getOutput()->addJsConfigVars($aJsVars);
 
                return '<div id="panelPermissionManager" style="height: 
500px"></div>';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f09958cb97186b6e700e1b90e265c4ebaf5273e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_22
Gerrit-Owner: Pwirth <wi...@hallowelt.biz>

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

Reply via email to