diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-07-20 16:47:26 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-07-20 16:47:26 +0200 |
commit | 1224d7ec01fc7ed7f273939aa88c356846648aa6 (patch) | |
tree | 709f7bab4db32a5ee577efcd0147508003c9e45f /apps/files_external | |
parent | 445f52ef8ba9698d21cea262a8c227ddc6564945 (diff) | |
download | nextcloud-server-1224d7ec01fc7ed7f273939aa88c356846648aa6.tar.gz nextcloud-server-1224d7ec01fc7ed7f273939aa88c356846648aa6.zip |
minor fixes for the google filestorage backend
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/lib/google.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php index 41b560ae84e..2ad85d09d5f 100644 --- a/apps/files_external/lib/google.php +++ b/apps/files_external/lib/google.php @@ -178,7 +178,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { if ($collection == '/' || $collection == '\.' || $collection == '.') { $uri = 'https://docs.google.com/feeds/default/private/full'; // Get parent content link - } else if ($dom = $this->getResource(basename($dir))) { + } else if ($dom = $this->getResource(basename($collection))) { $uri = $dom->getElementsByTagName('content')->item(0)->getAttribute('src'); } if (isset($uri)) { @@ -341,7 +341,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { break; } } - $title = basename($path); + $title = basename($path2); // Construct post data $postData = '<?xml version="1.0" encoding="UTF-8"?>'; $postData .= '<entry xmlns="http://www.w3.org/2005/Atom" xmlns:docs="http://schemas.google.com/docs/2007" xmlns:gd="http://schemas.google.com/g/2005" gd:etag='.$etag.'>'; @@ -352,13 +352,13 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { } else { // Move to different collection if ($collectionEntry = $this->getResource($collection)) { - $feedUri = $colelctionEntry->getElementsByTagName('content')->item(0)->getAttribute('src'); + $feedUri = $collectionEntry->getElementsByTagName('content')->item(0)->getAttribute('src'); // Construct post data $postData = '<?xml version="1.0" encoding="UTF-8"?>'; $postData .= '<entry xmlns="http://www.w3.org/2005/Atom">'; $postData .= '<id>'.$entry->getElementsByTagName('id')->item(0).'</id>'; $postData .= '</entry>'; - $this->sendRequest($uri, 'POST', $postData); + $this->sendRequest($feedUri, 'POST', $postData); return true; } } @@ -424,7 +424,6 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { } } if (!isset($uploadUri) && $entry) { - $etag = $entry->getAttribute('gd:etag'); $links = $entry->getElementsByTagName('link'); foreach ($links as $link) { if ($link->getAttribute('rel') == 'http://schemas.google.com/g/2005#resumable-create-media') { |