|
@@ 671-673 (lines=3) @@
|
| 668 |
|
} |
| 669 |
|
|
| 670 |
|
if (!$this->options['allowChmodReadOnly']) { |
| 671 |
|
if (!$this->attr($this->decode($hash), 'write', null, ($file['mime'] === 'directory'))) { |
| 672 |
|
return $this->setError(elFinder::ERROR_PERM_DENIED, $file['name']); |
| 673 |
|
} |
| 674 |
|
} |
| 675 |
|
|
| 676 |
|
$path = $this->decode($hash); |
|
@@ 1525-1527 (lines=3) @@
|
| 1522 |
|
return $this->setError(elFinder::ERROR_EXISTS, $name); |
| 1523 |
|
} |
| 1524 |
|
|
| 1525 |
|
if (!$this->allowCreate($dir, $name, ($file['mime'] === 'directory'))) { |
| 1526 |
|
return $this->setError(elFinder::ERROR_PERM_DENIED); |
| 1527 |
|
} |
| 1528 |
|
|
| 1529 |
|
$this->rmTmb($file); // remove old name tmbs, we cannot do this after dir move |
| 1530 |
|
|
|
@@ 1560-1562 (lines=3) @@
|
| 1557 |
|
$dir = $this->dirnameCE($path); |
| 1558 |
|
$name = $this->uniqueName($dir, $this->basenameCE($path), ' '.$suffix.' '); |
| 1559 |
|
|
| 1560 |
|
if (!$this->allowCreate($dir, $name, ($file['mime'] === 'directory'))) { |
| 1561 |
|
return $this->setError(elFinder::ERROR_PERM_DENIED); |
| 1562 |
|
} |
| 1563 |
|
|
| 1564 |
|
return ($path = $this->copy($path, $dir, $name)) == false |
| 1565 |
|
? false |
|
@@ 1625-1629 (lines=5) @@
|
| 1622 |
|
// check POST data `overwrite` for 3rd party uploader |
| 1623 |
|
$overwrite = isset($_POST['overwrite'])? (bool)$_POST['overwrite'] : $this->options['uploadOverwrite']; |
| 1624 |
|
if ($overwrite) { |
| 1625 |
|
if (!$file['write']) { |
| 1626 |
|
return $this->setError(elFinder::ERROR_PERM_DENIED); |
| 1627 |
|
} elseif ($file['mime'] == 'directory') { |
| 1628 |
|
return $this->setError(elFinder::ERROR_NOT_REPLACE, $name); |
| 1629 |
|
} |
| 1630 |
|
$this->remove($test); |
| 1631 |
|
} else { |
| 1632 |
|
$name = $this->uniqueName($dstpath, $name, '-', false); |