'configuration' => array(
'key' => 'Key',
'secret' => '*Secret',
- 'bucket' => 'Bucket')));
+ 'bucket' => 'Bucket'),
+ 'has_dependencies' => true));
OC_Mount_Config::registerBackend('\OC\Files\Storage\Dropbox', array(
'backend' => 'Dropbox',
'app_secret' => 'App secret',
'token' => '#token',
'token_secret' => '#token_secret'),
- 'custom' => 'dropbox'));
+ 'custom' => 'dropbox',
+ 'has_dependencies' => true));
OC_Mount_Config::registerBackend('\OC\Files\Storage\FTP', array(
'backend' => 'FTP',
'user' => 'Username',
'token' => '*Token',
'root' => '&Root',
- 'secure' => '!Secure ftps://')));
+ 'secure' => '!Secure ftps://'),
+ 'has_dependencies' => true));
OC_Mount_Config::registerBackend('\OC\Files\Storage\SMB', array(
'backend' => 'SMB / CIFS',
}
}
+ /**
+ * 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) {
if (!isset($params['key']) || !isset($params['secret']) || !isset($params['bucket'])) {
throw new \Exception("Access Key, Secret and Bucket have to be configured.");
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) {
if (isset($params['configured']) && $params['configured'] == 'true'
&& isset($params['app_key'])
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
*/