summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r--apps/files_external/lib/Lib/Storage/FTP.php24
-rw-r--r--apps/files_external/lib/Lib/Storage/SFTP.php4
-rw-r--r--apps/files_external/lib/Lib/StorageConfig.php2
-rw-r--r--apps/files_external/lib/Settings/Admin.php16
-rw-r--r--apps/files_external/lib/Settings/Personal.php16
5 files changed, 31 insertions, 31 deletions
diff --git a/apps/files_external/lib/Lib/Storage/FTP.php b/apps/files_external/lib/Lib/Storage/FTP.php
index d9e5e2a0d5a..60ee33facc0 100644
--- a/apps/files_external/lib/Lib/Storage/FTP.php
+++ b/apps/files_external/lib/Lib/Storage/FTP.php
@@ -47,17 +47,17 @@ class FTP extends StreamWrapper {
public function __construct($params) {
if (isset($params['host']) && isset($params['user']) && isset($params['password'])) {
- $this->host=$params['host'];
- $this->user=$params['user'];
- $this->password=$params['password'];
+ $this->host = $params['host'];
+ $this->user = $params['user'];
+ $this->password = $params['password'];
if (isset($params['secure'])) {
$this->secure = $params['secure'];
} else {
$this->secure = false;
}
- $this->root=isset($params['root'])?$params['root']:'/';
- if (! $this->root || $this->root[0]!=='/') {
- $this->root='/'.$this->root;
+ $this->root = isset($params['root'])?$params['root']:'/';
+ if (! $this->root || $this->root[0] !== '/') {
+ $this->root = '/'.$this->root;
}
if (substr($this->root, -1) !== '/') {
$this->root .= '/';
@@ -77,11 +77,11 @@ class FTP extends StreamWrapper {
* @return string
*/
public function constructUrl($path) {
- $url='ftp';
+ $url = 'ftp';
if ($this->secure) {
- $url.='s';
+ $url .= 's';
}
- $url.='://'.urlencode($this->user).':'.urlencode($this->password).'@'.$this->host.$this->root.$path;
+ $url .= '://'.urlencode($this->user).':'.urlencode($this->password).'@'.$this->host.$this->root.$path;
return $url;
}
@@ -120,10 +120,10 @@ class FTP extends StreamWrapper {
case 'c':
case 'c+':
//emulate these
- if (strrpos($path, '.')!==false) {
- $ext=substr($path, strrpos($path, '.'));
+ if (strrpos($path, '.') !== false) {
+ $ext = substr($path, strrpos($path, '.'));
} else {
- $ext='';
+ $ext = '';
}
$tmpFile = \OC::$server->getTempManager()->getTemporaryFile();
if ($this->file_exists($path)) {
diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php
index d1aea027cee..6921b157a20 100644
--- a/apps/files_external/lib/Lib/Storage/SFTP.php
+++ b/apps/files_external/lib/Lib/Storage/SFTP.php
@@ -86,7 +86,7 @@ class SFTP extends \OC\Files\Storage\Common {
// Register sftp://
Stream::register();
- $parsedHost = $this->splitHost($params['host']);
+ $parsedHost = $this->splitHost($params['host']);
$this->host = $parsedHost[0];
$this->port = $parsedHost[1];
@@ -404,7 +404,7 @@ class SFTP extends \OC\Files\Storage\Common {
/**
* {@inheritdoc}
*/
- public function touch($path, $mtime=null) {
+ public function touch($path, $mtime = null) {
try {
if (!is_null($mtime)) {
return false;
diff --git a/apps/files_external/lib/Lib/StorageConfig.php b/apps/files_external/lib/Lib/StorageConfig.php
index 7840b4c6dd8..ca26d49521c 100644
--- a/apps/files_external/lib/Lib/StorageConfig.php
+++ b/apps/files_external/lib/Lib/StorageConfig.php
@@ -184,7 +184,7 @@ class StorageConfig implements \JsonSerializable {
* @param Backend $backend
*/
public function setBackend(Backend $backend) {
- $this->backend= $backend;
+ $this->backend = $backend;
}
/**
diff --git a/apps/files_external/lib/Settings/Admin.php b/apps/files_external/lib/Settings/Admin.php
index ddb18c43dfb..85ad14886f8 100644
--- a/apps/files_external/lib/Settings/Admin.php
+++ b/apps/files_external/lib/Settings/Admin.php
@@ -62,14 +62,14 @@ class Admin implements ISettings {
*/
public function getForm() {
$parameters = [
- 'encryptionEnabled' => $this->encryptionManager->isEnabled(),
- 'visibilityType' => BackendService::VISIBILITY_ADMIN,
- 'storages' => $this->globalStoragesService->getStorages(),
- 'backends' => $this->backendService->getAvailableBackends(),
- 'authMechanisms' => $this->backendService->getAuthMechanisms(),
- 'dependencies' => \OCA\Files_External\MountConfig::dependencyMessage($this->backendService->getBackends()),
- 'allowUserMounting' => $this->backendService->isUserMountingAllowed(),
- 'globalCredentials' => $this->globalAuth->getAuth(''),
+ 'encryptionEnabled' => $this->encryptionManager->isEnabled(),
+ 'visibilityType' => BackendService::VISIBILITY_ADMIN,
+ 'storages' => $this->globalStoragesService->getStorages(),
+ 'backends' => $this->backendService->getAvailableBackends(),
+ 'authMechanisms' => $this->backendService->getAuthMechanisms(),
+ 'dependencies' => \OCA\Files_External\MountConfig::dependencyMessage($this->backendService->getBackends()),
+ 'allowUserMounting' => $this->backendService->isUserMountingAllowed(),
+ 'globalCredentials' => $this->globalAuth->getAuth(''),
'globalCredentialsUid' => '',
];
diff --git a/apps/files_external/lib/Settings/Personal.php b/apps/files_external/lib/Settings/Personal.php
index 85c9d5460fd..916c3c3d366 100644
--- a/apps/files_external/lib/Settings/Personal.php
+++ b/apps/files_external/lib/Settings/Personal.php
@@ -70,14 +70,14 @@ class Personal implements ISettings {
$uid = $this->userSession->getUser()->getUID();
$parameters = [
- 'encryptionEnabled' => $this->encryptionManager->isEnabled(),
- 'visibilityType' => BackendService::VISIBILITY_PERSONAL,
- 'storages' => $this->userGlobalStoragesService->getStorages(),
- 'backends' => $this->backendService->getAvailableBackends(),
- 'authMechanisms' => $this->backendService->getAuthMechanisms(),
- 'dependencies' => \OCA\Files_External\MountConfig::dependencyMessage($this->backendService->getBackends()),
- 'allowUserMounting' => $this->backendService->isUserMountingAllowed(),
- 'globalCredentials' => $this->globalAuth->getAuth($uid),
+ 'encryptionEnabled' => $this->encryptionManager->isEnabled(),
+ 'visibilityType' => BackendService::VISIBILITY_PERSONAL,
+ 'storages' => $this->userGlobalStoragesService->getStorages(),
+ 'backends' => $this->backendService->getAvailableBackends(),
+ 'authMechanisms' => $this->backendService->getAuthMechanisms(),
+ 'dependencies' => \OCA\Files_External\MountConfig::dependencyMessage($this->backendService->getBackends()),
+ 'allowUserMounting' => $this->backendService->isUserMountingAllowed(),
+ 'globalCredentials' => $this->globalAuth->getAuth($uid),
'globalCredentialsUid' => $uid,
];