diff options
author | Frank Karlitschek <frank@owncloud.org> | 2013-04-23 09:48:04 -0700 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2013-04-23 09:48:04 -0700 |
commit | 99cb37a6d121d2f9907c54ad026b7423e3d5cdd2 (patch) | |
tree | 18ffc752b8cb264b4c450a0b5725609b694a636e /apps | |
parent | c357f7b8cd6b1997b4e7843694358cff87b0ba47 (diff) | |
parent | 6141b24d9629ce181a86bbc7b6bb1d2c13c28154 (diff) | |
download | nextcloud-server-99cb37a6d121d2f9907c54ad026b7423e3d5cdd2.tar.gz nextcloud-server-99cb37a6d121d2f9907c54ad026b7423e3d5cdd2.zip |
Merge pull request #3092 from guruz/external_storage_check_for_curl
External Storage: Check for curl in PHP
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/files_external/lib/config.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index 01462cb6f85..4cb9b7c8ecd 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -70,7 +70,7 @@ class OC_Mount_Config { 'root' => '&Root', 'secure' => '!Secure ftps://')); - $backends['\OC\Files\Storage\Google']=array( + if(OC_Mount_Config::checkcurl()) $backends['\OC\Files\Storage\Google']=array( 'backend' => 'Google Drive', 'configuration' => array( 'configured' => '#configured', @@ -96,7 +96,7 @@ class OC_Mount_Config { 'share' => 'Share', 'root' => '&Root')); - $backends['\OC\Files\Storage\DAV']=array( + if(OC_Mount_Config::checkcurl()) $backends['\OC\Files\Storage\DAV']=array( 'backend' => 'ownCloud / WebDAV', 'configuration' => array( 'host' => 'URL', @@ -415,6 +415,13 @@ class OC_Mount_Config { } /** + * check if curl is installed + */ + public static function checkcurl() { + return (function_exists('curl_init')); + } + + /** * check dependencies */ public static function checkDependencies() { @@ -426,6 +433,9 @@ class OC_Mount_Config { 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 />'; } + if(!OC_Mount_Config::checkcurl()) { + $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); } |