Skip to content
Snippets Groups Projects
Commit 99cb37a6 authored by Frank Karlitschek's avatar Frank Karlitschek
Browse files

Merge pull request #3092 from guruz/external_storage_check_for_curl

External Storage: Check for curl in PHP
parents c357f7b8 6141b24d
No related branches found
No related tags found
No related merge requests found
......@@ -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',
......@@ -414,6 +414,13 @@ class OC_Mount_Config {
}
}
/**
* check if curl is installed
*/
public static function checkcurl() {
return (function_exists('curl_init'));
}
/**
* check dependencies
*/
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment