mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Update apps/files_external/lib/sftp.php
Created test() function as per @pull/1031
This commit is contained in:
parent
ab31c3ef4e
commit
ab4d52e980
1 changed files with 6 additions and 4 deletions
|
|
@ -20,10 +20,6 @@ class OC_Filestorage_SFTP extends OC_Filestorage_Common {
|
|||
private static $tempFiles = array();
|
||||
|
||||
public function __construct($params) {
|
||||
if (!isset($params['host']) || !isset($params['user']) || !isset($params['password'])) {
|
||||
throw new Exception("Required parameters not set");
|
||||
}
|
||||
|
||||
$this->host = $params['host'];
|
||||
$proto = strpos($this->host, '://');
|
||||
if ($proto != false) {
|
||||
|
|
@ -53,6 +49,12 @@ class OC_Filestorage_SFTP extends OC_Filestorage_Common {
|
|||
$this->write_host_keys($host_keys);
|
||||
}
|
||||
}
|
||||
|
||||
public function test() {
|
||||
if (!isset($params['host']) || !isset($params['user']) || !isset($params['password'])) {
|
||||
throw new Exception("Required parameters not set");
|
||||
}
|
||||
}
|
||||
|
||||
private function abs_path($path) {
|
||||
return $this->root . $path;
|
||||
|
|
|
|||
Loading…
Reference in a new issue