MDL-32290 - Repositories - Fixing missing slash from the URL path

This commit is contained in:
Jason Fowler 2012-06-20 09:52:53 +08:00 committed by Aparup Banerjee
parent 7128d8fca2
commit e85b7e7865

View file

@ -144,7 +144,7 @@ class boxclient {
'__login'=>1
);
try {
$ret = $c->post($this->_box_api_auth_url.$ticket, $param);
$ret = $c->post($this->_box_api_auth_url.'/'.$ticket, $param);
} catch (moodle_exception $e) {
$this->setError(0, 'connection time-out or invalid url');
return false;
@ -245,7 +245,7 @@ class boxclient {
'size'=>display_size((int)$file->attributes()->size),
'thumbnail'=>$thumbnail,
'date'=>userdate((int)$file->attributes()->updated),
'source'=> $this->_box_api_download_url
'source'=> $this->_box_api_download_url .'/'
.$this->auth_token.'/'.(string)$file->attributes()->id,
'url'=>(string)$file->attributes()->shared_link);
$tree[] = $tmp;