[volume:dropbox] fix cache GC problem on netunmount

This commit is contained in:
nao-pon
2014-03-09 21:18:26 +09:00
parent 4cd108ecb3
commit ce6342d091
+6 -5
View File
@@ -226,10 +226,14 @@ class elFinderVolumeDropbox extends elFinderVolumeDriver {
* @param array $options
* @return boolean
*/
public function netunmount($netVolumes) {
public function netunmount($netVolumes, $key) {
$count = 0;
$dropboxUid = '';
if (isset($netVolumes[$key])) {
$dropboxUid = $netVolumes[$key]['dropboxUid'];
}
foreach($netVolumes as $volume) {
if ($volume['host'] === 'dropbox') {
if (@$volume['host'] === 'dropbox' && @$volume['dropboxUid'] === $dropboxUid) {
$count++;
}
}
@@ -331,9 +335,6 @@ class elFinderVolumeDropbox extends elFinderVolumeDriver {
}
}
// auth ok
$_SESSION['elFinderDropboxTokens'] = array($this->options['dropboxUid'], $this->options['accessToken'], $this->options['accessTokenSecret']);
$this->dropboxUid = $this->options['dropboxUid'];
$this->tmbPrefix = 'dropbox'.base_convert($this->dropboxUid, 10, 32);