Files: explicitly define
This commit is contained in:
parent
5ef9d96d10
commit
9bdc43e1fc
|
@ -11,6 +11,8 @@ $dir = stripslashes($_POST["dir"]);
|
|||
$file = stripslashes($_POST["file"]);
|
||||
$target = stripslashes(rawurldecode($_POST["target"]));
|
||||
|
||||
$l = OC_L10N::get('files');
|
||||
|
||||
if(\OC\Files\Filesystem::file_exists($target . '/' . $file)) {
|
||||
OCP\JSON::error(array("data" => array( "message" => $l->t("Could not move %s - File with this name already exists", array($file)) )));
|
||||
exit;
|
||||
|
|
|
@ -11,6 +11,8 @@ $dir = stripslashes($_GET["dir"]);
|
|||
$file = stripslashes($_GET["file"]);
|
||||
$newname = stripslashes($_GET["newname"]);
|
||||
|
||||
$l = OC_L10N::get('files');
|
||||
|
||||
if ( $newname !== '.' and ($dir != '' || $file != 'Shared') and $newname !== '.') {
|
||||
$targetFile = \OC\Files\Filesystem::normalizePath($dir . '/' . $newname);
|
||||
$sourceFile = \OC\Files\Filesystem::normalizePath($dir . '/' . $file);
|
||||
|
|
Loading…
Reference in New Issue