[VD] use tmbPath as tmp directory as fallback

This commit is contained in:
nao-pon
2017-04-24 22:31:04 +09:00
parent 4560db05be
commit f47a64d4c3
7 changed files with 26 additions and 14 deletions
+5 -3
View File
@@ -796,9 +796,6 @@ class elFinderVolumeBox extends elFinderVolumeDriver
}
}
if (!$this->tmp && is_writable($this->options['tmbPath'])) {
$this->tmp = $this->options['tmbPath'];
}
if (!$this->tmp && ($tmp = elFinder::getStaticVar('commonTempPath'))) {
$this->tmp = $tmp;
}
@@ -821,6 +818,11 @@ class elFinderVolumeBox extends elFinderVolumeDriver
{
parent::configure();
// fallback of $this->tmp
if (!$this->tmp && $this->tmbPathWritable) {
$this->tmp = $this->tmbPath;
}
$this->disabled[] = 'archive';
$this->disabled[] = 'extract';
}
+5 -3
View File
@@ -535,9 +535,6 @@ class elFinderVolumeDropbox2 extends elFinderVolumeDriver
}
}
if (!$this->tmp && is_writable($this->options['tmbPath'])) {
$this->tmp = $this->options['tmbPath'];
}
if (!$this->tmp && ($tmp = elFinder::getStaticVar('commonTempPath'))) {
$this->tmp = $tmp;
}
@@ -560,6 +557,11 @@ class elFinderVolumeDropbox2 extends elFinderVolumeDriver
{
parent::configure();
// fallback of $this->tmp
if (!$this->tmp && $this->tmbPathWritable) {
$this->tmp = $this->tmbPath;
}
$this->disabled[] = 'archive';
$this->disabled[] = 'extract';
+2 -1
View File
@@ -217,7 +217,8 @@ class elFinderVolumeFTP extends elFinderVolumeDriver {
$this->tmp = $tmp;
}
if (!$this->tmp && $this->tmbPath) {
// fallback of $this->tmp
if (!$this->tmp && $this->tmbPathWritable) {
$this->tmp = $this->tmbPath;
}
+6 -3
View File
@@ -110,6 +110,7 @@ class elFinderVolumeGoogleDrive extends elFinderVolumeDriver
'gdAlias' => '%s@GDrive',
'googleApiClient' => '',
'path' => '/',
'tmbPath' => '',
'separator' => '/',
'useGoogleTmb' => true,
'acceptedName' => '#^[^/\\?*:|"<>]*[^./\\?*:|"<>]$#',
@@ -976,9 +977,6 @@ class elFinderVolumeGoogleDrive extends elFinderVolumeDriver
}
}
if (!$this->tmp && is_writable($this->options['tmbPath'])) {
$this->tmp = $this->options['tmbPath'];
}
if (!$this->tmp && ($tmp = elFinder::getStaticVar('commonTempPath'))) {
$this->tmp = $tmp;
}
@@ -1005,6 +1003,11 @@ class elFinderVolumeGoogleDrive extends elFinderVolumeDriver
{
parent::configure();
// fallback of $this->tmp
if (!$this->tmp && $this->tmbPathWritable) {
$this->tmp = $this->tmbPath;
}
$this->disabled[] = 'archive';
$this->disabled[] = 'extract';
+1
View File
@@ -26,6 +26,7 @@ class elFinderVolumeGroup extends elFinderVolumeDriver {
$this->options['path'] = '/';
$this->options['dirUrlOwn'] = true;
$this->options['syncMinMs'] = 0;
$this->options['tmbPath'] = '';
$this->options['disabled'] = array(
'archive',
'cut',
+2 -1
View File
@@ -148,7 +148,8 @@ class elFinderVolumeMySQL extends elFinderVolumeDriver {
$this->tmpPath = $tmp;
}
if (!$this->tmpPath && $this->tmbPath && $this->tmbPathWritable) {
// fallback of $this->tmp
if (!$this->tmpPath && $this->tmbPathWritable) {
$this->tmpPath = $this->tmbPath;
}
+5 -3
View File
@@ -747,9 +747,6 @@ class elFinderVolumeOneDrive extends elFinderVolumeDriver
}
}
if (!$this->tmp && is_writable($this->options['tmbPath'])) {
$this->tmp = $this->options['tmbPath'];
}
if (!$this->tmp && ($tmp = elFinder::getStaticVar('commonTempPath'))) {
$this->tmp = $tmp;
}
@@ -783,6 +780,11 @@ class elFinderVolumeOneDrive extends elFinderVolumeDriver
{
parent::configure();
// fallback of $this->tmp
if (!$this->tmp && $this->tmbPathWritable) {
$this->tmp = $this->tmbPath;
}
$this->disabled[] = 'archive';
$this->disabled[] = 'extract';
}