summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-03-26 13:57:28 +0100
committerVincent Petry <pvince81@owncloud.com>2015-03-26 13:57:28 +0100
commit534892d45646ca9c90be9b2632dc25dc21f9038d (patch)
tree1f01908d8aeb76fcf4bef261242a4209ffe519a0
parent43588fe2f78ff00586a45de9cbbadcadeaa03c4b (diff)
downloadnextcloud-server-534892d45646ca9c90be9b2632dc25dc21f9038d.tar.gz
nextcloud-server-534892d45646ca9c90be9b2632dc25dc21f9038d.zip
Added rawurlencode for other params in GDrive storage
-rw-r--r--apps/files_external/lib/google.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
index bf0fa4815b1..47be43924ef 100644
--- a/apps/files_external/lib/google.php
+++ b/apps/files_external/lib/google.php
@@ -103,7 +103,7 @@ class Google extends \OC\Files\Storage\Common {
if (isset($this->driveFiles[$path])) {
$parentId = $this->driveFiles[$path]->getId();
} else {
- $q = "title='".rawurlencode($name)."' and '".$parentId."' in parents and trashed = false";
+ $q = "title='" . rawurlencode($name) . "' and '" . rawurlencode($parentId) . "' in parents and trashed = false";
$result = $this->service->files->listFiles(array('q' => $q))->getItems();
if (!empty($result)) {
// Google Drive allows files with the same name, ownCloud doesn't
@@ -247,7 +247,7 @@ class Google extends \OC\Files\Storage\Common {
if ($pageToken !== true) {
$params['pageToken'] = $pageToken;
}
- $params['q'] = "'".$folder->getId()."' in parents and trashed = false";
+ $params['q'] = "'" . rawurlencode($folder->getId()) . "' in parents and trashed = false";
$children = $this->service->files->listFiles($params);
foreach ($children->getItems() as $child) {
$name = $child->getTitle();