Fix undefined root parameter in Dropbox storage

This commit is contained in:
Michael Gapczynski 2013-02-26 17:52:06 -05:00
parent f3a8bf9260
commit 25cf18f614

View file

@ -40,8 +40,8 @@ class Dropbox extends \OC\Files\Storage\Common {
&& isset($params['token'])
&& isset($params['token_secret'])
) {
$this->id = 'dropbox::'.$params['app_key'] . $params['token']. '/' . $params['root'];
$this->root=isset($params['root'])?$params['root']:'';
$this->root = isset($params['root']) ? $params['root'] : '';
$this->id = 'dropbox::'.$params['app_key'] . $params['token']. '/' . $this->root;
$oauth = new \Dropbox_OAuth_Curl($params['app_key'], $params['app_secret']);
$oauth->setToken($params['token'], $params['token_secret']);
$this->dropbox = new \Dropbox_API($oauth, 'dropbox');