Added cURL dependency for Amazon S3, Dropbox and SWIFT
Conflicts: apps/files_external/lib/amazons3.php apps/files_external/lib/swift.php
This commit is contained in:
parent
46379113a1
commit
ff9a4a6d91
|
@ -41,7 +41,8 @@ OC_Mount_Config::registerBackend('\OC\Files\Storage\AmazonS3', array(
|
||||||
'configuration' => array(
|
'configuration' => array(
|
||||||
'key' => 'Key',
|
'key' => 'Key',
|
||||||
'secret' => '*Secret',
|
'secret' => '*Secret',
|
||||||
'bucket' => 'Bucket')));
|
'bucket' => 'Bucket'),
|
||||||
|
'has_dependencies' => true));
|
||||||
|
|
||||||
OC_Mount_Config::registerBackend('\OC\Files\Storage\Dropbox', array(
|
OC_Mount_Config::registerBackend('\OC\Files\Storage\Dropbox', array(
|
||||||
'backend' => 'Dropbox',
|
'backend' => 'Dropbox',
|
||||||
|
@ -51,7 +52,8 @@ OC_Mount_Config::registerBackend('\OC\Files\Storage\Dropbox', array(
|
||||||
'app_secret' => 'App secret',
|
'app_secret' => 'App secret',
|
||||||
'token' => '#token',
|
'token' => '#token',
|
||||||
'token_secret' => '#token_secret'),
|
'token_secret' => '#token_secret'),
|
||||||
'custom' => 'dropbox'));
|
'custom' => 'dropbox',
|
||||||
|
'has_dependencies' => true));
|
||||||
|
|
||||||
OC_Mount_Config::registerBackend('\OC\Files\Storage\FTP', array(
|
OC_Mount_Config::registerBackend('\OC\Files\Storage\FTP', array(
|
||||||
'backend' => 'FTP',
|
'backend' => 'FTP',
|
||||||
|
@ -79,7 +81,8 @@ OC_Mount_Config::registerBackend('\OC\Files\Storage\SWIFT', array(
|
||||||
'user' => 'Username',
|
'user' => 'Username',
|
||||||
'token' => '*Token',
|
'token' => '*Token',
|
||||||
'root' => '&Root',
|
'root' => '&Root',
|
||||||
'secure' => '!Secure ftps://')));
|
'secure' => '!Secure ftps://'),
|
||||||
|
'has_dependencies' => true));
|
||||||
|
|
||||||
OC_Mount_Config::registerBackend('\OC\Files\Storage\SMB', array(
|
OC_Mount_Config::registerBackend('\OC\Files\Storage\SMB', array(
|
||||||
'backend' => 'SMB / CIFS',
|
'backend' => 'SMB / CIFS',
|
||||||
|
|
|
@ -73,6 +73,18 @@ class AmazonS3 extends \OC\Files\Storage\Common {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check if curl is installed
|
||||||
|
*/
|
||||||
|
public static function checkDependencies() {
|
||||||
|
if (function_exists('curl_init')) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
$l = new \OC_L10N('files_external');
|
||||||
|
return $l->t('<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of Amazon S3 is not possible. Please ask your system administrator to install it.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function __construct($params) {
|
public function __construct($params) {
|
||||||
if (!isset($params['key']) || !isset($params['secret']) || !isset($params['bucket'])) {
|
if (!isset($params['key']) || !isset($params['secret']) || !isset($params['bucket'])) {
|
||||||
throw new \Exception("Access Key, Secret and Bucket have to be configured.");
|
throw new \Exception("Access Key, Secret and Bucket have to be configured.");
|
||||||
|
|
|
@ -33,6 +33,18 @@ class Dropbox extends \OC\Files\Storage\Common {
|
||||||
|
|
||||||
private static $tempFiles = array();
|
private static $tempFiles = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check if curl is installed
|
||||||
|
*/
|
||||||
|
public static function checkDependencies() {
|
||||||
|
if (function_exists('curl_init')) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
$l = new \OC_L10N('files_external');
|
||||||
|
return $l->t('<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of Dropbox is not possible. Please ask your system administrator to install it.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function __construct($params) {
|
public function __construct($params) {
|
||||||
if (isset($params['configured']) && $params['configured'] == 'true'
|
if (isset($params['configured']) && $params['configured'] == 'true'
|
||||||
&& isset($params['app_key'])
|
&& isset($params['app_key'])
|
||||||
|
|
|
@ -65,6 +65,18 @@ class Swift extends \OC\Files\Storage\Common {
|
||||||
return $path;
|
return $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check if curl is installed
|
||||||
|
*/
|
||||||
|
public static function checkDependencies() {
|
||||||
|
if (function_exists('curl_init')) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
$l = new \OC_L10N('files_external');
|
||||||
|
return $l->t('<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of OpenStack Swift is not possible. Please ask your system administrator to install it.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $path
|
* @param string $path
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue