Use absolute namespace

This commit is contained in:
Lukas Reschke 2015-08-05 10:28:11 +02:00
parent 728780aee8
commit 99224905d8
2 changed files with 7 additions and 7 deletions

View File

@ -30,8 +30,6 @@
*/ */
namespace OC\Files\Storage; namespace OC\Files\Storage;
use phpseclib\Net\RSA;
use phpseclib\Net\SFTP;
use phpseclib\Net\SFTP\Stream; use phpseclib\Net\SFTP\Stream;
/** /**
@ -91,7 +89,7 @@ class SFTP extends \OC\Files\Storage\Common {
/** /**
* Returns the connection. * Returns the connection.
* *
* @return SFTP connected client instance * @return \phpseclib\Net\SFTP connected client instance
* @throws \Exception when the connection failed * @throws \Exception when the connection failed
*/ */
public function getConnection() { public function getConnection() {
@ -100,7 +98,7 @@ class SFTP extends \OC\Files\Storage\Common {
} }
$hostKeys = $this->readHostKeys(); $hostKeys = $this->readHostKeys();
$this->client = new SFTP($this->host, $this->port); $this->client = new \phpseclib\Net\SFTP($this->host, $this->port);
// The SSH Host Key MUST be verified before login(). // The SSH Host Key MUST be verified before login().
$currentHostKey = $this->client->getServerPublicHostKey(); $currentHostKey = $this->client->getServerPublicHostKey();

View File

@ -23,12 +23,14 @@
namespace OC\Files\Storage; namespace OC\Files\Storage;
use phpseclib\Crypt\RSA; use phpseclib\Crypt\RSA;
use phpseclib\Net\SFTP;
class SFTP_Key extends \OC\Files\Storage\SFTP { class SFTP_Key extends \OC\Files\Storage\SFTP {
private $publicKey; private $publicKey;
private $privateKey; private $privateKey;
/**
* {@inheritdoc}
*/
public function __construct($params) { public function __construct($params) {
parent::__construct($params); parent::__construct($params);
$this->publicKey = $params['public_key']; $this->publicKey = $params['public_key'];
@ -38,7 +40,7 @@ class SFTP_Key extends \OC\Files\Storage\SFTP {
/** /**
* Returns the connection. * Returns the connection.
* *
* @return SFTP connected client instance * @return \phpseclib\Net\SFTP connected client instance
* @throws \Exception when the connection failed * @throws \Exception when the connection failed
*/ */
public function getConnection() { public function getConnection() {
@ -47,7 +49,7 @@ class SFTP_Key extends \OC\Files\Storage\SFTP {
} }
$hostKeys = $this->readHostKeys(); $hostKeys = $this->readHostKeys();
$this->client = new SFTP($this->getHost()); $this->client = new \phpseclib\Net\SFTP($this->getHost());
// The SSH Host Key MUST be verified before login(). // The SSH Host Key MUST be verified before login().
$currentHostKey = $this->client->getServerPublicHostKey(); $currentHostKey = $this->client->getServerPublicHostKey();