summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/google.php
diff options
context:
space:
mode:
authorPhilipp Kapfer <philipp.kapfer@gmx.at>2013-05-25 17:10:20 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-04-03 16:30:48 +0200
commit8ca897df76d2a93f66dbe097984eb1e8752410ce (patch)
tree10a02fd2737909ff6742434f1c0c857fea0ce4bc /apps/files_external/lib/google.php
parentf7da4280ca1512a4a8224d28e3f6fd954c3b7205 (diff)
downloadnextcloud-server-8ca897df76d2a93f66dbe097984eb1e8752410ce.tar.gz
nextcloud-server-8ca897df76d2a93f66dbe097984eb1e8752410ce.zip
Added cURL dependency check to Google Drive and WebDAV backend
Added check for backend's checkDependencies method to OC_Mount_Config::getBackends() when backend is configured to have some instead of blindly calling it and crashing Conflicts: apps/files_external/lib/config.php apps/files_external/lib/google.php
Diffstat (limited to 'apps/files_external/lib/google.php')
-rw-r--r--apps/files_external/lib/google.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
index 35457f68528..936153b35a5 100644
--- a/apps/files_external/lib/google.php
+++ b/apps/files_external/lib/google.php
@@ -41,6 +41,18 @@ class Google extends \OC\Files\Storage\Common {
const DRAWING = 'application/vnd.google-apps.drawing';
const PRESENTATION = 'application/vnd.google-apps.presentation';
+ /**
+ * 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>Warning:</b> The cURL support in PHP is not enabled or installed. Mounting of Google Drive is not possible. Please ask your system administrator to install it.');
+ }
+ }
+
public function __construct($params) {
if (isset($params['configured']) && $params['configured'] === 'true'
&& isset($params['client_id']) && isset($params['client_secret'])