summaryrefslogtreecommitdiffstats
path: root/apps/files_external/ajax/google.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/ajax/google.php')
-rw-r--r--apps/files_external/ajax/google.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_external/ajax/google.php b/apps/files_external/ajax/google.php
index 40c10aa5d07..b80f24bbd2c 100644
--- a/apps/files_external/ajax/google.php
+++ b/apps/files_external/ajax/google.php
@@ -1,7 +1,7 @@
<?php
set_include_path(get_include_path().PATH_SEPARATOR.
\OC_App::getAppPath('files_external').'/3rdparty/google-api-php-client/src');
-require_once 'Google_Client.php';
+require_once 'Google/Client.php';
OCP\JSON::checkAppEnabled('files_external');
OCP\JSON::checkLoggedIn();
@@ -14,6 +14,7 @@ if (isset($_POST['client_id']) && isset($_POST['client_secret']) && isset($_POST
$client->setClientSecret($_POST['client_secret']);
$client->setRedirectUri($_POST['redirect']);
$client->setScopes(array('https://www.googleapis.com/auth/drive'));
+ $client->setAccessType('offline');
if (isset($_POST['step'])) {
$step = $_POST['step'];
if ($step == 1) {