Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Now: $path = str_replace('%2F', '/', rawurlencode($path));

  • Loading branch information...
commit e18dab4507c461614b9611e1ad5b822c7c019a49 1 parent 34a06ec
@72quadrat 72quadrat authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 libraries/Dropbox.php
View
18 libraries/Dropbox.php
@@ -191,7 +191,7 @@ public function account()
**/
public function get($destination, $path, $root=self::DEFAULT_ROOT)
{
- $path = str_replace('%2F', '/', urlencode($path));
+ $path = str_replace('%2F', '/', rawurlencode($path));
return $this->_content_request("/files/{$root}/{$path}", $destination);
}
@@ -205,7 +205,7 @@ public function get($destination, $path, $root=self::DEFAULT_ROOT)
**/
public function thumbnails($destination, $path, array $params = array('size'=>'small', 'format'=>'JPEG'), $root=self::DEFAULT_ROOT)
{
- $path = str_replace('%2F', '/', urlencode($path));
+ $path = str_replace('%2F', '/', rawurlencode($path));
$parstr = http_build_query($params);
return $this->_content_request("/thumbnails/{$root}/{$path}?{$parstr}", $destination);
}
@@ -241,7 +241,7 @@ public function add($dbpath, $filepath, array $params = array(), $root=self::DEF
**/
public function metadata($path, array $params = array(), $root=self::DEFAULT_ROOT)
{
- $path = str_replace('%2F', '/', urlencode($path));
+ $path = str_replace('%2F', '/', rawurlencode($path));
$parstr = empty($params) ? '' : '?'.http_build_query($params);
return $this->_response_request("/metadata/{$root}/{$path}{$parstr}");
}
@@ -258,7 +258,7 @@ public function metadata($path, array $params = array(), $root=self::DEFAULT_ROO
**/
public function revisions($path, array $params = array(), $root=self::DEFAULT_ROOT)
{
- $path = str_replace('%2F', '/', urlencode($path));
+ $path = str_replace('%2F', '/', rawurlencode($path));
$parstr = empty($params) ? '' : '?'.http_build_query($params);
return $this->_response_request("/revisions/{$root}/{$path}{$parstr}");
}
@@ -273,7 +273,7 @@ public function revisions($path, array $params = array(), $root=self::DEFAULT_RO
**/
public function restore($path, $revision, $root=self::DEFAULT_ROOT)
{
- $path = str_replace('%2F', '/', urlencode($path));
+ $path = str_replace('%2F', '/', rawurlencode($path));
return $this->_post_request("/restore/{$root}/{$path}?rev={$revision}");
}
@@ -288,7 +288,7 @@ public function restore($path, $revision, $root=self::DEFAULT_ROOT)
**/
public function search($path, $query, array $params = array(), $root=self::DEFAULT_ROOT)
{
- $path = str_replace('%2F', '/', urlencode($path));
+ $path = str_replace('%2F', '/', rawurlencode($path));
$query = rawurlencode($query);
$parstr = empty($params) ? '' : '&'.http_build_query($params);
return $this->_response_request("/search/{$root}/{$path}?query={$query}{$parstr}");
@@ -305,7 +305,7 @@ public function search($path, $query, array $params = array(), $root=self::DEFAU
**/
public function shares($path, $root=self::DEFAULT_ROOT)
{
- $path = str_replace('%2F', '/', urlencode($path));
+ $path = str_replace('%2F', '/', rawurlencode($path));
return $this->_response_request("/shares/{$root}/{$path}");
}
@@ -318,7 +318,7 @@ public function shares($path, $root=self::DEFAULT_ROOT)
**/
public function media($path, $root=self::DEFAULT_ROOT)
{
- $path = str_replace('%2F', '/', urlencode($path));
+ $path = str_replace('%2F', '/', rawurlencode($path));
return $this->_response_request("/media/{$root}/{$path}");
}
@@ -345,7 +345,7 @@ public function copy($from, $to, $root=self::DEFAULT_ROOT)
**/
public function copy_ref($path, $root=self::DEFAULT_ROOT)
{
- $path = str_replace('%2F', '/', urlencode($path));
+ $path = str_replace('%2F', '/', rawurlencode($path));
return $this->_response_request("/copy_ref/{$root}/{$path}");
}
Please sign in to comment.
Something went wrong with that request. Please try again.