MDL-33513 box.net repository should have filename in source field
This commit is contained in:
@@ -188,6 +188,30 @@ class boxclient {
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get box.net file info
|
||||
*
|
||||
* @param string $fileid
|
||||
* @param array $params
|
||||
* @return array|null
|
||||
*/
|
||||
function get_file_info($fileid) {
|
||||
$this->_clearErrors();
|
||||
$params = array();
|
||||
$params['action'] = 'get_file_info';
|
||||
$params['file_id'] = $fileid;
|
||||
$params['auth_token'] = $this->auth_token;
|
||||
$params['api_key'] = $this->api_key;
|
||||
$http = new curl(array('debug'=>$this->debug, 'cache'=>true, 'module_cache'=>'repository'));
|
||||
$xml = $http->get($this->_box_api_url, $params);
|
||||
$o = simplexml_load_string(trim($xml));
|
||||
if($o->status == 's_get_file_info') {
|
||||
return $o->info;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $sax
|
||||
* @param array $tree Passed by reference
|
||||
|
||||
Reference in New Issue
Block a user