diff options
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/appinfo/info.xml | 2 | ||||
-rw-r--r-- | apps/files_external/l10n/hy.php | 3 | ||||
-rw-r--r-- | apps/files_external/l10n/my_MM.php | 3 | ||||
-rwxr-xr-x | apps/files_external/lib/config.php | 16 | ||||
-rw-r--r-- | apps/files_external/lib/sftp.php | 14 |
5 files changed, 22 insertions, 16 deletions
diff --git a/apps/files_external/appinfo/info.xml b/apps/files_external/appinfo/info.xml index 2c04216a9fb..0542b7b10a7 100644 --- a/apps/files_external/appinfo/info.xml +++ b/apps/files_external/appinfo/info.xml @@ -5,7 +5,7 @@ <description>Mount external storage sources</description> <licence>AGPL</licence> <author>Robin Appelman, Michael Gapczynski</author> - <require>4.91</require> + <require>4.93</require> <shipped>true</shipped> <types> <filesystem/> diff --git a/apps/files_external/l10n/hy.php b/apps/files_external/l10n/hy.php new file mode 100644 index 00000000000..3b80487278a --- /dev/null +++ b/apps/files_external/l10n/hy.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"Delete" => "Ջնջել" +); diff --git a/apps/files_external/l10n/my_MM.php b/apps/files_external/l10n/my_MM.php new file mode 100644 index 00000000000..5acfbb0321e --- /dev/null +++ b/apps/files_external/l10n/my_MM.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"Users" => "သုံးစွဲသူ" +); diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index d31c2f35a68..905c5d50cde 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -38,7 +38,7 @@ class OC_Mount_Config { * @return array */ public static function getBackends() { - + $backends['\OC\Files\Storage\Local']=array( 'backend' => 'Local', 'configuration' => array( @@ -77,7 +77,7 @@ class OC_Mount_Config { 'token' => '#token', 'token_secret' => '#token secret'), 'custom' => 'google'); - + $backends['\OC\Files\Storage\SWIFT']=array( 'backend' => 'OpenStack Swift', 'configuration' => array( @@ -86,7 +86,7 @@ class OC_Mount_Config { 'token' => '*Token', 'root' => '&Root', 'secure' => '!Secure ftps://')); - + if(OC_Mount_Config::checksmbclient()) $backends['\OC\Files\Storage\SMB']=array( 'backend' => 'SMB / CIFS', 'configuration' => array( @@ -95,7 +95,7 @@ class OC_Mount_Config { 'password' => '*Password', 'share' => 'Share', 'root' => '&Root')); - + $backends['\OC\Files\Storage\DAV']=array( 'backend' => 'ownCloud / WebDAV', 'configuration' => array( @@ -104,13 +104,13 @@ class OC_Mount_Config { 'password' => '*Password', 'root' => '&Root', 'secure' => '!Secure https://')); - + $backends['\OC\Files\Storage\SFTP']=array( 'backend' => 'SFTP', 'configuration' => array( 'host' => 'URL', - 'user' => 'Username', - 'password' => '*Password', + 'user' => 'Username', + 'password' => '*Password', 'root' => '&Root')); return($backends); @@ -378,7 +378,7 @@ class OC_Mount_Config { } /** - * check if php-ftp is installed + * check if php-ftp is installed */ public static function checkphpftp() { if(function_exists('ftp_login')) { diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php index 785eb7dfc42..ede6c251fd9 100644 --- a/apps/files_external/lib/sftp.php +++ b/apps/files_external/lib/sftp.php @@ -32,7 +32,7 @@ class SFTP extends \OC\Files\Storage\Common { $this->root = isset($params['root']) ? $this->cleanPath($params['root']) : '/'; if ($this->root[0] != '/') $this->root = '/' . $this->root; if (substr($this->root, -1, 1) != '/') $this->root .= '/'; - + $host_keys = $this->read_host_keys(); $this->client = new \Net_SFTP($this->host); @@ -50,18 +50,18 @@ class SFTP extends \OC\Files\Storage\Common { $host_keys[$this->host] = $current_host_key; $this->write_host_keys($host_keys); } - + if(!$this->file_exists('')){ $this->mkdir(''); } } - + public function test() { if (!isset($params['host']) || !isset($params['user']) || !isset($params['password'])) { throw new \Exception("Required parameters not set"); - } + } } - + public function getId(){ return 'sftp::' . $this->user . '@' . $this->host . '/' . $this->root; } @@ -109,7 +109,7 @@ class SFTP extends \OC\Files\Storage\Common { $host_key_arr = explode("::", $line, 2); if (count($host_key_arr) == 2) { $hosts[] = $host_key_arr[0]; - $keys[] = $host_key_arr[1]; + $keys[] = $host_key_arr[1]; } } return array_combine($hosts, $keys); @@ -203,7 +203,7 @@ class SFTP extends \OC\Files\Storage\Common { $tmp = \OC_Helper::tmpFile($ext); $this->getFile($abs_path, $tmp); return fopen($tmp, $mode); - + case 'w': case 'wb': case 'a': |