mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
src build elFinder-2.1-da1c7d2
This commit is contained in:
@@ -1265,6 +1265,12 @@ abstract class elFinderVolumeDriver {
|
||||
unset($this->sessionCache[$_key]);
|
||||
}
|
||||
}
|
||||
if ($this->sessionCaching['subdirs']) {
|
||||
if (! isset($this->sessionCache['subdirs'])) {
|
||||
$this->sessionCache['subdirs'] = array();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->configure();
|
||||
|
||||
@@ -2712,6 +2718,17 @@ abstract class elFinderVolumeDriver {
|
||||
return $this->convEncOut($this->_dimensions($this->convEncIn($this->decode($hash)), $file['mime']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return has subdirs
|
||||
*
|
||||
* @param string $hash file hash
|
||||
* @return bool
|
||||
* @author Naoki Sawada
|
||||
**/
|
||||
public function subdirs($hash) {
|
||||
return (bool) $this->subdirsCE($this->decode($hash));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return content URL (for netmout volume driver)
|
||||
* If file.url == 1 requests from JavaScript client with XHR
|
||||
@@ -3047,9 +3064,7 @@ abstract class elFinderVolumeDriver {
|
||||
**/
|
||||
protected function subdirsCE($path) {
|
||||
if ($this->sessionCaching['subdirs']) {
|
||||
if (! isset($this->sessionCache['subdirs'])) {
|
||||
$this->sessionCache['subdirs'] = array();
|
||||
} else if (isset($this->sessionCache['subdirs'][$path]) && ! $this->isMyReload()) {
|
||||
if (isset($this->sessionCache['subdirs'][$path]) && ! $this->isMyReload()) {
|
||||
return $this->sessionCache['subdirs'][$path];
|
||||
}
|
||||
}
|
||||
@@ -3759,7 +3774,11 @@ abstract class elFinderVolumeDriver {
|
||||
if ($this->options['checkSubfolders']) {
|
||||
if (isset($stat['dirs'])) {
|
||||
if ($stat['dirs']) {
|
||||
$stat['dirs'] = 1;
|
||||
if ($stat['dirs'] === -1) {
|
||||
$stat['dirs'] = (isset($this->sessionCache['subdirs']) && isset($this->sessionCache['subdirs'][$path]))? (int)$this->sessionCache['subdirs'][$path] : -1;
|
||||
} else {
|
||||
$stat['dirs'] = 1;
|
||||
}
|
||||
} else {
|
||||
unset($stat['dirs']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user