Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Commit

Permalink
Now: $path = str_replace('%2F', '/', rawurlencode($path));
Browse files Browse the repository at this point in the history
  • Loading branch information
72quadrat committed May 12, 2012
1 parent 34a06ec commit e18dab4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions libraries/Dropbox.php
Expand Up @@ -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);
}

Expand All @@ -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);
}
Expand Down Expand Up @@ -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}");
}
Expand All @@ -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}");
}
Expand All @@ -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}");
}

Expand All @@ -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}");
Expand All @@ -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}");
}

Expand All @@ -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}");
}

Expand All @@ -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}");
}

Expand Down

0 comments on commit e18dab4

Please sign in to comment.