r80929 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80928‎ | r80929 | r80930 >
Date:22:05, 24 January 2011
Author:reedy
Status:deferred
Tags:
Comment:
Wrong constructor call, 1 more explicit array definition

Add a fixme too
Modified paths:
  • /trunk/extensions/OpenStackManager/OpenStackNovaProject.php (modified) (history)
  • /trunk/extensions/OpenStackManager/OpenStackNovaRole.php (modified) (history)
  • /trunk/extensions/OpenStackManager/special/SpecialNovaSecurityGroup.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OpenStackManager/special/SpecialNovaSecurityGroup.php
@@ -488,7 +488,7 @@
489489 $group = $this->adminNova->getSecurityGroup( $groupname );
490490 if ( $group ) {
491491 # This isn't a supported function in the API for now. Leave this action out for now
492 - $success = $this->userNova->modifySecurityGroup( $groupname, array( 'description' => $description )) ;
 492+ $success = $this->userNova->modifySecurityGroup( $groupname, array( 'description' => $description )); // FIXME: $description is undefined
493493 if ( $success ) {
494494 $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-modifiedgroup' ) );
495495 } else {
Index: trunk/extensions/OpenStackManager/OpenStackNovaRole.php
@@ -93,6 +93,7 @@
9494 return false;
9595 }
9696 unset( $members[$index] );
 97+ $values = array();
9798 $values['member'] = array();
9899 foreach ( $members as $member ) {
99100 $values['member'][] = $member;
@@ -178,6 +179,12 @@
179180 return $roles;
180181 }
181182
 183+ /**
 184+ * @static
 185+ * @param $rolename
 186+ * @param $project OpenStackNovaProject
 187+ * @return bool
 188+ */
182189 static function createRole( $rolename, $project ) {
183190 global $wgAuth;
184191 global $wgOpenStackManagerLDAPUser, $wgOpenStackManagerLDAPUserPassword;
Index: trunk/extensions/OpenStackManager/OpenStackNovaProject.php
@@ -196,7 +196,7 @@
197197 wfSuppressWarnings();
198198 $success = ldap_add( $wgAuth->ldapconn, $projectdn, $project );
199199 wfRestoreWarnings();
200 - $project = OpenStackNovaProject( $projectname );
 200+ $project = new OpenStackNovaProject( $projectname );
201201 if ( $success ) {
202202 foreach ( self::$rolenames as $rolename ) {
203203 $role = OpenStackNovaRole::createRole( $rolename, $project );

Status & tagging log