r107037 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107036‎ | r107037 | r107038 >
Date:02:40, 22 December 2011
Author:laner
Status:ok
Tags:
Comment:
Select the default security group by default on instance creation. Resolves bug 27437.
Modified paths:
  • /trunk/extensions/OpenStackManager/special/SpecialNovaInstance.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OpenStackManager/special/SpecialNovaInstance.php
@@ -198,16 +198,21 @@
199199
200200 $securityGroups = $this->adminNova->getSecurityGroups();
201201 $group_keys = array();
 202+ $defaults = array();
202203 foreach ( $securityGroups as $securityGroup ) {
203204 if ( $securityGroup->getOwner() == $project ) {
204205 $securityGroupName = $securityGroup->getGroupName();
205206 $group_keys["$securityGroupName"] = $securityGroupName;
 207+ if ( $securityGroupName == "default" ) {
 208+ $defaults["default"] = "default";
 209+ }
206210 }
207211 }
208212 $instanceInfo['groups'] = array(
209213 'type' => 'multiselect',
210214 'section' => 'instance/info',
211215 'options' => $group_keys,
 216+ 'default' => $defaults,
212217 'label-message' => 'openstackmanager-securitygroups',
213218 'name' => 'groups',
214219 );

Status & tagging log