mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
Merge branch '2.x' into 2.1
This commit is contained in:
@@ -61,16 +61,6 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
|
||||
$this->aroot = realpath($this->root);
|
||||
$root = $this->stat($this->root);
|
||||
|
||||
if ($this->options['quarantine']) {
|
||||
$this->attributes[] = array(
|
||||
'pattern' => '~^'.preg_quote(DIRECTORY_SEPARATOR.$this->options['quarantine']).'$~',
|
||||
'read' => false,
|
||||
'write' => false,
|
||||
'locked' => true,
|
||||
'hidden' => true
|
||||
);
|
||||
}
|
||||
|
||||
// chek thumbnails path
|
||||
if ($this->options['tmbPath']) {
|
||||
$this->options['tmbPath'] = strpos($this->options['tmbPath'], DIRECTORY_SEPARATOR) === false
|
||||
@@ -93,17 +83,35 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
|
||||
}
|
||||
|
||||
// check quarantine dir
|
||||
$this->quarantine = '';
|
||||
if (!empty($this->options['quarantine'])) {
|
||||
$this->quarantine = $this->root.DIRECTORY_SEPARATOR.$this->options['quarantine'];
|
||||
if ((!is_dir($this->quarantine) && !$this->_mkdir($this->root, $this->options['quarantine'])) || !is_writable($this->quarantine)) {
|
||||
$this->archivers['extract'] = array();
|
||||
$this->disabled[] = 'extract';
|
||||
if ($this->options['quarantine'] !== basename($this->options['quarantine'])) {
|
||||
if (is_dir($this->options['quarantine']) && is_writable($this->options['quarantine'])) {
|
||||
$this->quarantine = $this->options['quarantine'];
|
||||
}
|
||||
$this->options['quarantine'] = '';
|
||||
} else {
|
||||
$this->quarantine = $this->root.DIRECTORY_SEPARATOR.$this->options['quarantine'];
|
||||
if ((!is_dir($this->quarantine) && !$this->_mkdir($this->root, $this->options['quarantine'])) || !is_writable($this->quarantine)) {
|
||||
$this->options['quarantine'] = $this->quarantine = '';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
if (!$this->quarantine) {
|
||||
$this->archivers['extract'] = array();
|
||||
$this->disabled[] = 'extract';
|
||||
}
|
||||
|
||||
if ($this->options['quarantine']) {
|
||||
$this->attributes[] = array(
|
||||
'pattern' => '~^'.preg_quote(DIRECTORY_SEPARATOR.$this->options['quarantine']).'$~',
|
||||
'read' => false,
|
||||
'write' => false,
|
||||
'locked' => true,
|
||||
'hidden' => true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user