diff options
author | Georg Ehrke <developer@georgehrke.com> | 2013-08-19 11:24:17 +0200 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2013-08-19 11:24:17 +0200 |
commit | f2702ff1ca45d72300eed5dfa58ebc19aa6e9910 (patch) | |
tree | b1424be17877cbd25bf3781600d353efd3dd0759 /apps/files_external | |
parent | 7e4dcd268f6cb6618600718a51c4d882e9027829 (diff) | |
parent | 9be836814cb4165ea54a086a0f97526d783bcd37 (diff) | |
download | nextcloud-server-f2702ff1ca45d72300eed5dfa58ebc19aa6e9910.tar.gz nextcloud-server-f2702ff1ca45d72300eed5dfa58ebc19aa6e9910.zip |
Merge master into oc_preview
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/ajax/addMountPoint.php | 2 | ||||
-rw-r--r-- | apps/files_external/ajax/google.php | 2 | ||||
-rw-r--r-- | apps/files_external/js/google.js | 2 | ||||
-rw-r--r-- | apps/files_external/l10n/ru_RU.php | 6 | ||||
-rw-r--r-- | apps/files_external/lib/amazons3.php | 2 | ||||
-rwxr-xr-x | apps/files_external/lib/config.php | 38 | ||||
-rw-r--r-- | apps/files_external/lib/google.php | 2 | ||||
-rw-r--r-- | apps/files_external/lib/sftp.php | 2 | ||||
-rw-r--r-- | apps/files_external/lib/webdav.php | 1 | ||||
-rw-r--r-- | apps/files_external/tests/google.php | 2 |
10 files changed, 30 insertions, 29 deletions
diff --git a/apps/files_external/ajax/addMountPoint.php b/apps/files_external/ajax/addMountPoint.php index fed2ddfcf3d..9100d47db3a 100644 --- a/apps/files_external/ajax/addMountPoint.php +++ b/apps/files_external/ajax/addMountPoint.php @@ -16,4 +16,4 @@ $status = OC_Mount_Config::addMountPoint($_POST['mountPoint'], $_POST['mountType'], $_POST['applicable'], $isPersonal); -OCP\JSON::success(array('data' => array('message' => $status)));
\ No newline at end of file +OCP\JSON::success(array('data' => array('message' => $status))); diff --git a/apps/files_external/ajax/google.php b/apps/files_external/ajax/google.php index e63b7cb07b9..2594a1780b3 100644 --- a/apps/files_external/ajax/google.php +++ b/apps/files_external/ajax/google.php @@ -39,4 +39,4 @@ if (isset($_POST['client_id']) && isset($_POST['client_secret']) && isset($_POST } } } -}
\ No newline at end of file +} diff --git a/apps/files_external/js/google.js b/apps/files_external/js/google.js index 7e111a95d98..b4be1c1dc41 100644 --- a/apps/files_external/js/google.js +++ b/apps/files_external/js/google.js @@ -126,4 +126,4 @@ $(document).ready(function() { } }); -});
\ No newline at end of file +}); diff --git a/apps/files_external/l10n/ru_RU.php b/apps/files_external/l10n/ru_RU.php deleted file mode 100644 index 6dcd0460ada..00000000000 --- a/apps/files_external/l10n/ru_RU.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -$TRANSLATIONS = array( -"Groups" => "Группы", -"Delete" => "Удалить" -); -$PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"; diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php index f4d1940b184..9363a350e27 100644 --- a/apps/files_external/lib/amazons3.php +++ b/apps/files_external/lib/amazons3.php @@ -79,7 +79,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { $this->bucket = $params['bucket']; $scheme = ($params['use_ssl'] === 'false') ? 'http' : 'https'; - $this->test = ( isset($params['test'])) ? true : false; + $this->test = isset($params['test']); $this->timeout = ( ! isset($params['timeout'])) ? 15 : $params['timeout']; $params['region'] = ( ! isset($params['region'])) ? 'eu-west-1' : $params['region']; $params['hostname'] = ( !isset($params['hostname'])) ? 's3.amazonaws.com' : $params['hostname']; diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index e3a2cf0b30b..1935740cd2e 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -93,14 +93,18 @@ class OC_Mount_Config { 'root' => '&Root', 'secure' => '!Secure ftps://')); - if(OC_Mount_Config::checksmbclient()) $backends['\OC\Files\Storage\SMB']=array( - 'backend' => 'SMB / CIFS', - 'configuration' => array( - 'host' => 'URL', - 'user' => 'Username', - 'password' => '*Password', - 'share' => 'Share', - 'root' => '&Root')); + if (!OC_Util::runningOnWindows()) { + if (OC_Mount_Config::checksmbclient()) { + $backends['\OC\Files\Storage\SMB'] = array( + 'backend' => 'SMB / CIFS', + 'configuration' => array( + 'host' => 'URL', + 'user' => 'Username', + 'password' => '*Password', + 'share' => 'Share', + 'root' => '&Root')); + } + } if(OC_Mount_Config::checkcurl()) $backends['\OC\Files\Storage\DAV']=array( 'backend' => 'ownCloud / WebDAV', @@ -414,9 +418,9 @@ class OC_Mount_Config { public static function checksmbclient() { if(function_exists('shell_exec')) { $output=shell_exec('which smbclient'); - return (empty($output)?false:true); + return !empty($output); }else{ - return(false); + return false; } } @@ -425,9 +429,9 @@ class OC_Mount_Config { */ public static function checkphpftp() { if(function_exists('ftp_login')) { - return(true); + return true; }else{ - return(false); + return false; } } @@ -435,7 +439,7 @@ class OC_Mount_Config { * check if curl is installed */ public static function checkcurl() { - return (function_exists('curl_init')); + return function_exists('curl_init'); } /** @@ -444,8 +448,10 @@ class OC_Mount_Config { public static function checkDependencies() { $l= new OC_L10N('files_external'); $txt=''; - if(!OC_Mount_Config::checksmbclient()) { - $txt.=$l->t('<b>Warning:</b> "smbclient" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it.').'<br />'; + if (!OC_Util::runningOnWindows()) { + if(!OC_Mount_Config::checksmbclient()) { + $txt.=$l->t('<b>Warning:</b> "smbclient" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it.').'<br />'; + } } if(!OC_Mount_Config::checkphpftp()) { $txt.=$l->t('<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it.').'<br />'; @@ -454,6 +460,6 @@ class OC_Mount_Config { $txt.=$l->t('<b>Warning:</b> The Curl support in PHP is not enabled or installed. Mounting of ownCloud / WebDAV or GoogleDrive is not possible. Please ask your system administrator to install it.').'<br />'; } - return($txt); + return $txt; } } diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php index ef8dd6d8cad..e6cdacdec4f 100644 --- a/apps/files_external/lib/google.php +++ b/apps/files_external/lib/google.php @@ -587,4 +587,4 @@ class Google extends \OC\Files\Storage\Common { return false; } -}
\ No newline at end of file +} diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php index 4fd36096463..f7f329b8993 100644 --- a/apps/files_external/lib/sftp.php +++ b/apps/files_external/lib/sftp.php @@ -170,7 +170,7 @@ class SFTP extends \OC\Files\Storage\Common { public function file_exists($path) { try { - return $this->client->stat($this->abs_path($path)) === false ? false : true; + return $this->client->stat($this->abs_path($path)) !== false; } catch (\Exception $e) { return false; } diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php index 4869322d87a..f98be318f1c 100644 --- a/apps/files_external/lib/webdav.php +++ b/apps/files_external/lib/webdav.php @@ -173,6 +173,7 @@ class DAV extends \OC\Files\Storage\Common{ curl_setopt($curl, CURLOPT_USERPWD, $this->user.':'.$this->password); curl_setopt($curl, CURLOPT_URL, $this->createBaseUri().$path); curl_setopt($curl, CURLOPT_FILE, $fp); + curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_exec ($curl); curl_close ($curl); diff --git a/apps/files_external/tests/google.php b/apps/files_external/tests/google.php index 12faabb902d..d5495d49c5e 100644 --- a/apps/files_external/tests/google.php +++ b/apps/files_external/tests/google.php @@ -42,4 +42,4 @@ class Google extends Storage { $this->instance->rmdir('/'); } } -}
\ No newline at end of file +} |