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:
@@ -407,7 +407,7 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
|
||||
}
|
||||
|
||||
if (substr($target, 0, 1) != DIRECTORY_SEPARATOR) {
|
||||
$target = dirname($path).DIRECTORY_SEPARATOR.$target;
|
||||
$target = $this->_joinPath(dirname($path), $target);
|
||||
}
|
||||
|
||||
if ($this->_inpath($target, $this->aroot)) {
|
||||
@@ -430,7 +430,7 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
|
||||
|
||||
foreach (scandir($path) as $name) {
|
||||
if ($name != '.' && $name != '..') {
|
||||
$files[] = $path.DIRECTORY_SEPARATOR.$name;
|
||||
$files[] = $this->_joinPath($path, $name);
|
||||
}
|
||||
}
|
||||
return $files;
|
||||
@@ -470,7 +470,7 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
|
||||
* @author Dmitry (dio) Levashov
|
||||
**/
|
||||
protected function _mkdir($path, $name) {
|
||||
$path = $path.DIRECTORY_SEPARATOR.$name;
|
||||
$path = $this->_joinPath($path, $name);
|
||||
|
||||
if (@mkdir($path)) {
|
||||
@chmod($path, $this->options['dirMode']);
|
||||
@@ -489,7 +489,7 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
|
||||
* @author Dmitry (dio) Levashov
|
||||
**/
|
||||
protected function _mkfile($path, $name) {
|
||||
$path = $path.DIRECTORY_SEPARATOR.$name;
|
||||
$path = $this->_joinPath($path, $name);
|
||||
|
||||
if (($fp = @fopen($path, 'w'))) {
|
||||
@fclose($fp);
|
||||
@@ -509,7 +509,7 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
|
||||
* @author Dmitry (dio) Levashov
|
||||
**/
|
||||
protected function _symlink($source, $targetDir, $name) {
|
||||
return @symlink($source, $targetDir.DIRECTORY_SEPARATOR.$name);
|
||||
return @symlink($source, $this->_joinPath($targetDir, $name));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -522,7 +522,7 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
|
||||
* @author Dmitry (dio) Levashov
|
||||
**/
|
||||
protected function _copy($source, $targetDir, $name) {
|
||||
return copy($source, $targetDir.DIRECTORY_SEPARATOR.$name);
|
||||
return copy($source, $this->_joinPath($targetDir, $name));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -536,7 +536,7 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
|
||||
* @author Dmitry (dio) Levashov
|
||||
**/
|
||||
protected function _move($source, $targetDir, $name) {
|
||||
$target = $targetDir.DIRECTORY_SEPARATOR.$name;
|
||||
$target = $this->_joinPath($targetDir, $name);
|
||||
return @rename($source, $target) ? $target : false;
|
||||
}
|
||||
|
||||
@@ -574,7 +574,7 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
|
||||
* @author Dmitry (dio) Levashov
|
||||
**/
|
||||
protected function _save($fp, $dir, $name, $stat) {
|
||||
$path = $dir.DIRECTORY_SEPARATOR.$name;
|
||||
$path = $this->_joinPath($dir, $name);
|
||||
|
||||
if (@file_put_contents($path, $fp, LOCK_EX) === false) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user