]> source.dussan.org Git - nextcloud-server.git/commitdiff
Added cURL dependency for Amazon S3, Dropbox and SWIFT
authorPhilipp Kapfer <philipp.kapfer@gmx.at>
Sat, 1 Jun 2013 09:28:02 +0000 (11:28 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Thu, 3 Apr 2014 14:38:43 +0000 (16:38 +0200)
Conflicts:
apps/files_external/lib/amazons3.php
apps/files_external/lib/swift.php

apps/files_external/appinfo/app.php
apps/files_external/lib/amazons3.php
apps/files_external/lib/dropbox.php
apps/files_external/lib/swift.php

index 39881b8455bf3d970cdfc844be49a0360b7042b1..f49d29732346bd82aceab85ba2e45afbcd88c006 100644 (file)
@@ -41,7 +41,8 @@ OC_Mount_Config::registerBackend('\OC\Files\Storage\AmazonS3', array(
        'configuration' => array(
                'key' => 'Key',
                'secret' => '*Secret',
-               'bucket' => 'Bucket')));
+               'bucket' => 'Bucket'),
+       'has_dependencies' => true));
 
 OC_Mount_Config::registerBackend('\OC\Files\Storage\Dropbox', array(
        'backend' => 'Dropbox',
@@ -51,7 +52,8 @@ OC_Mount_Config::registerBackend('\OC\Files\Storage\Dropbox', array(
                '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',
@@ -79,7 +81,8 @@ OC_Mount_Config::registerBackend('\OC\Files\Storage\SWIFT', array(
                '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',
index 06ccd5d16fa0d2efc53adfa176ac9f0f04ef19af..969070360fef359e7723bba0bdc9c61f698f1bd7 100644 (file)
@@ -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) {
                if (!isset($params['key']) || !isset($params['secret']) || !isset($params['bucket'])) {
                        throw new \Exception("Access Key, Secret and Bucket have to be configured.");
index 0214e18020c3923bb98d052650aaf221fe80ac91..f6a54bc0ca8d8f4c37520d682611f8e04b0dc739 100755 (executable)
@@ -33,6 +33,18 @@ class Dropbox extends \OC\Files\Storage\Common {
 
        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'])
index 1337d9f581d30afa9bb5844c4749bbfbae319ba2..a66d53fc1a8174525641a78bcd092774ec4a8e0c 100644 (file)
@@ -65,6 +65,18 @@ class Swift extends \OC\Files\Storage\Common {
                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
         */