r114721 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114720‎ | r114721 | r114722 >
Date:22:49, 4 April 2012
Author:laner
Status:deferred
Tags:
Comment:
Follow-up r113405. Fixed use of formdata['key'] and fixes a log message.
Modified paths:
  • /trunk/extensions/OpenStackManager/OpenStackNovaUser.php (modified) (history)
  • /trunk/extensions/OpenStackManager/special/SpecialNovaKey.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OpenStackManager/special/SpecialNovaKey.php
@@ -179,7 +179,7 @@
180180 $this->pushResourceColumn( $keyRow, $key );
181181 $actions = Array();
182182 array_push( $actions, $this->createActionLink( 'openstackmanager-delete', array( 'action' => 'delete', 'hash' => $hash ) ) );
183 - $this->pushResourceColumn( $keyRow, $this->createResourceList( $actions) );
 183+ $this->pushRawResourceColumn( $keyRow, $this->createResourceList( $actions) );
184184 array_push( $keyRows, $keyRow );
185185 }
186186 $out .= $this->createResourceTable( $headers, $keyRows );
@@ -311,14 +311,14 @@
312312 # Windows user providing it in PuTTY format.
313313 $key = self::opensshFormatKey( $key );
314314 if ( $key === false ) {
315 - $this->getOutput()->addWikiMsg( 'openstackmanager-keypairwrongformat' );
 315+ $this->getOutput()->addWikiMsg( 'openstackmanager-keypairformatwrong' );
316316 return false;
317317 }
318318 $this->getOutput()->addWikiMsg( 'openstackmanager-keypairformatconverted' );
319319 }
320320
321321 if ( $wgOpenStackManagerNovaKeypairStorage == 'ldap' ) {
322 - $success = $this->userLDAP->importKeypair( $formData['key'] );
 322+ $success = $this->userLDAP->importKeypair( $key );
323323 if ( ! $success ) {
324324 $this->getOutput()->addWikiMsg( 'openstackmanager-keypairimportfailed' );
325325 return false;
@@ -328,7 +328,7 @@
329329 # wgOpenStackManagerNovaKeypairStorage == 'nova'
330330 # OpenStack's EC2 API doesn't yet support importing keys, use
331331 # of this option isn't currently recommended
332 - $keypair = $this->userNova->importKeypair( $formData['keyname'], $formData['key'] );
 332+ $keypair = $this->userNova->importKeypair( $formData['keyname'], $key );
333333
334334 $this->getOutput()->addWikiMsg( 'openstackmanager-keypairimportedfingerprint', $keypair->getKeyName(), $keypair->getKeyFingerprint() );
335335 } else {
Index: trunk/extensions/OpenStackManager/OpenStackNovaUser.php
@@ -280,7 +280,7 @@
281281 if ( $success ) {
282282 $wgAuth->printDebug( "Successfully imported the user's sshpublickey", NONSENSITIVE );
283283 $key = wfMemcKey( 'ldapauthentication', "userinfo", $this->userDN );
284 - $this->printDebug( "Deleting memcache key: $key.", NONSENSITIVE );
 284+ $wgAuth->printDebug( "Deleting memcache key: $key.", NONSENSITIVE );
285285 $wgMemc->delete( $key );
286286 $this->fetchUserInfo();
287287 return true;
@@ -316,7 +316,7 @@
317317 if ( $success ) {
318318 $wgAuth->printDebug( "Successfully deleted the user's sshpublickey", NONSENSITIVE );
319319 $key = wfMemcKey( 'ldapauthentication', "userinfo", $this->userDN );
320 - $this->printDebug( "Deleting memcache key: $key.", NONSENSITIVE );
 320+ $wgAuth->printDebug( "Deleting memcache key: $key.", NONSENSITIVE );
321321 $wgMemc->delete( $key );
322322 $this->fetchUserInfo();
323323 return true;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r113405I'm fed up of new labs users having problems on initial login...platonides21:22, 8 March 2012

Status & tagging log