MDL-32290 - Repositories - Fixing missing slash from the URL path
authorJason Fowler <phalacee@gmail.com>
Wed, 20 Jun 2012 01:52:53 +0000 (09:52 +0800)
committerAparup Banerjee <aparup@moodle.com>
Wed, 20 Jun 2012 02:41:58 +0000 (10:41 +0800)
lib/boxlib.php

index 264b2c5..0cee0da 100644 (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;