Commit 02970f75 authored by Ad Schellevis's avatar Ad Schellevis

revert refresh token patch

parent 2639fd9f
...@@ -88,9 +88,6 @@ class Drive ...@@ -88,9 +88,6 @@ class Drive
if ($filename != null) { if ($filename != null) {
$query .= " and title in '".$filename."'"; $query .= " and title in '".$filename."'";
} }
if ($this->client->getAuth()->isAccessTokenExpired()) {
$this->client->getAuth()->refreshTokenWithAssertion($this->cred);
}
return $this->service->files->listFiles(array('q' => $query)); return $this->service->files->listFiles(array('q' => $query));
} }
...@@ -101,9 +98,6 @@ class Drive ...@@ -101,9 +98,6 @@ class Drive
*/ */
public function download($fileHandle) public function download($fileHandle)
{ {
if ($this->client->getAuth()->isAccessTokenExpired()) {
$this->client->getAuth()->refreshTokenWithAssertion($this->cred);
}
$sUrl = $fileHandle->getDownloadUrl(); $sUrl = $fileHandle->getDownloadUrl();
$request = new \Google_Http_Request($sUrl, 'GET', null, null); $request = new \Google_Http_Request($sUrl, 'GET', null, null);
$httpRequest = $this->client->getAuth()->authenticatedRequest($request); $httpRequest = $this->client->getAuth()->authenticatedRequest($request);
...@@ -127,9 +121,6 @@ class Drive ...@@ -127,9 +121,6 @@ class Drive
public function upload($directoryId, $filename, $content, $mimetype = 'text/plain') public function upload($directoryId, $filename, $content, $mimetype = 'text/plain')
{ {
if ($this->client->getAuth()->isAccessTokenExpired()) {
$this->client->getAuth()->refreshTokenWithAssertion($this->cred);
}
$parent = new \Google_Service_Drive_ParentReference(); $parent = new \Google_Service_Drive_ParentReference();
$parent->setId($directoryId); $parent->setId($directoryId);
...@@ -154,9 +145,6 @@ class Drive ...@@ -154,9 +145,6 @@ class Drive
*/ */
public function delete($fileHandle) public function delete($fileHandle)
{ {
if ($this->client->getAuth()->isAccessTokenExpired()) {
$this->client->getAuth()->refreshTokenWithAssertion($this->cred);
}
$this->service->files->delete($fileHandle['id']); $this->service->files->delete($fileHandle['id']);
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment