src build elFinder-2.1-9aaa0cf

This commit is contained in:
nao-pon
2020-01-10 23:16:08 +09:00
parent bfa0a6ad26
commit 228a511fce
12 changed files with 60 additions and 20 deletions
+4 -1
View File
@@ -210,6 +210,9 @@ class elFinderVolumeFlysystemGoogleDriveNetmount extends ExtDriver
try {
$file = $service->files->get($options['path']);
$options['alias'] = sprintf($this->options['gdAlias'], $file->getName());
if (!empty($this->options['netkey'])) {
elFinder::$instance->updateNetVolumeOption($this->options['netkey'], 'alias', $this->options['alias']);
}
} catch (Google_Service_Exception $e) {
$err = json_decode($e->getMessage(), true);
if (isset($err['error']) && $err['error']['code'] == 404) {
@@ -276,7 +279,7 @@ class elFinderVolumeFlysystemGoogleDriveNetmount extends ExtDriver
if (!empty($opts['access_token'])) {
$client->setAccessToken($opts['access_token']);
}
if ($client->isAccessTokenExpired()) {
if ($this->needOnline && $client->isAccessTokenExpired()) {
try {
$creds = $client->fetchAccessTokenWithRefreshToken();
} catch (LogicException $e) {