From 61811b60ac7bb46e67d262c94651ac23696b1aef Mon Sep 17 00:00:00 2001
From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com>
Date: Tue, 2 Mar 2021 11:14:11 +0800
Subject: [PATCH] remove / in return_uri
---
disk/Googledrive.php | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/disk/Googledrive.php b/disk/Googledrive.php
index f31b263..84fc9fa 100644
--- a/disk/Googledrive.php
+++ b/disk/Googledrive.php
@@ -13,7 +13,6 @@ class Googledrive {
} else {
$this->client_id = '106151778902-ajieetaab5ondhbvia97n4tr5k0cg8eo.apps.googleusercontent.com';
$this->client_secret = 'LlCV-rQClzYIKCEqiVddh68G';
- //$this->api_key = 'AIzaSyBjQG09ET3pqEXKs25K8OPI_YYBWuR0EZQ';
}
//$this->oauth_url = 'https://www.googleapis.com/oauth2/v4/';
$this->oauth_url = 'https://accounts.google.com/o/oauth2/';
@@ -102,7 +101,7 @@ class Googledrive {
while (substr($path, -1)=='/') $path = substr($path, 0, -1);
if ($path == '') $path = '/';
- //if (!($files = getcache('path_' . $path, $this->disktag))) {
+ if (!($files = getcache('path_' . $path, $this->disktag))) {
//$response = curl('GET', $this->api_url . 'drives', '', ['Authorization' => 'Bearer ' . $this->access_token]);
//$response = curl('GET', $this->api_url . 'files?fields=*,files(id,name,mimeType,size,modifiedTime,parents,webContentLink,thumbnailLink),nextPageToken' . (($this->default_drive_id!='')?'&driveId=' . $this->default_drive_id . '&corpora=teamDrive&includeItemsFromAllDrives=true&supportsAllDrives=true':''), '', ['Authorization' => 'Bearer ' . $this->access_token]);
if ($path == '/' || $path == '') {
@@ -162,7 +161,7 @@ class Googledrive {
} else {
savecache('path_' . $path, $files, $this->disktag, 600);
}
- //}
+ }
//error_log1('path:' . $path . ', files:' . json_encode($files, JSON_PRETTY_PRINT));
//error_log1('path:' . $path . ', files:' . substr(json_encode($files), 0, 150));
return $files;
@@ -413,13 +412,13 @@ class Googledrive {