https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114721

Revision: 114721
Author:   laner
Date:     2012-04-04 22:49:33 +0000 (Wed, 04 Apr 2012)
Log Message:
-----------
Follow-up r113405. Fixed use of formdata['key'] and fixes a log message.

Modified Paths:
--------------
    trunk/extensions/OpenStackManager/OpenStackNovaUser.php
    trunk/extensions/OpenStackManager/special/SpecialNovaKey.php

Modified: trunk/extensions/OpenStackManager/OpenStackNovaUser.php
===================================================================
--- trunk/extensions/OpenStackManager/OpenStackNovaUser.php     2012-04-04 
22:31:20 UTC (rev 114720)
+++ trunk/extensions/OpenStackManager/OpenStackNovaUser.php     2012-04-04 
22:49:33 UTC (rev 114721)
@@ -280,7 +280,7 @@
                if ( $success ) {
                        $wgAuth->printDebug( "Successfully imported the user's 
sshpublickey", NONSENSITIVE );
                        $key = wfMemcKey( 'ldapauthentication', "userinfo", 
$this->userDN );
-                       $this->printDebug( "Deleting memcache key: $key.", 
NONSENSITIVE );
+                       $wgAuth->printDebug( "Deleting memcache key: $key.", 
NONSENSITIVE );
                        $wgMemc->delete( $key );
                        $this->fetchUserInfo();
                        return true;
@@ -316,7 +316,7 @@
                        if ( $success ) {
                                $wgAuth->printDebug( "Successfully deleted the 
user's sshpublickey", NONSENSITIVE );
                                $key = wfMemcKey( 'ldapauthentication', 
"userinfo", $this->userDN );
-                               $this->printDebug( "Deleting memcache key: 
$key.", NONSENSITIVE );
+                               $wgAuth->printDebug( "Deleting memcache key: 
$key.", NONSENSITIVE );
                                $wgMemc->delete( $key );
                                $this->fetchUserInfo();
                                return true;

Modified: trunk/extensions/OpenStackManager/special/SpecialNovaKey.php
===================================================================
--- trunk/extensions/OpenStackManager/special/SpecialNovaKey.php        
2012-04-04 22:31:20 UTC (rev 114720)
+++ trunk/extensions/OpenStackManager/special/SpecialNovaKey.php        
2012-04-04 22:49:33 UTC (rev 114721)
@@ -179,7 +179,7 @@
                                $this->pushResourceColumn( $keyRow, $key );
                                $actions = Array();
                                array_push( $actions, $this->createActionLink( 
'openstackmanager-delete', array( 'action' => 'delete', 'hash' => $hash ) ) );
-                               $this->pushResourceColumn( $keyRow, 
$this->createResourceList( $actions) );
+                               $this->pushRawResourceColumn( $keyRow, 
$this->createResourceList( $actions) );
                                array_push( $keyRows, $keyRow );
                        }
                        $out .= $this->createResourceTable( $headers, $keyRows 
);
@@ -311,14 +311,14 @@
                        # Windows user providing it in PuTTY format.
                        $key = self::opensshFormatKey( $key );
                        if ( $key === false ) {
-                               $this->getOutput()->addWikiMsg( 
'openstackmanager-keypairwrongformat' );
+                               $this->getOutput()->addWikiMsg( 
'openstackmanager-keypairformatwrong' );
                                return false;
                        }
                        $this->getOutput()->addWikiMsg( 
'openstackmanager-keypairformatconverted' );
                }
  
                if ( $wgOpenStackManagerNovaKeypairStorage == 'ldap' ) {
-                       $success = $this->userLDAP->importKeypair( 
$formData['key'] );
+                       $success = $this->userLDAP->importKeypair( $key );
                        if ( ! $success ) {
                                $this->getOutput()->addWikiMsg( 
'openstackmanager-keypairimportfailed' );
                                return false;
@@ -328,7 +328,7 @@
                        # wgOpenStackManagerNovaKeypairStorage == 'nova'
                        # OpenStack's EC2 API doesn't yet support importing 
keys, use
                        # of this option isn't currently recommended
-                       $keypair = $this->userNova->importKeypair( 
$formData['keyname'], $formData['key'] );
+                       $keypair = $this->userNova->importKeypair( 
$formData['keyname'], $key );
 
                        $this->getOutput()->addWikiMsg( 
'openstackmanager-keypairimportedfingerprint', $keypair->getKeyName(), 
$keypair->getKeyFingerprint() );
                } else {


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to