From 9bdc43e1fcb4576c82fa03fd59deb2aa28282aba Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 8 Feb 2013 12:03:28 +0100 Subject: [PATCH] Files: explicitly define --- apps/files/ajax/move.php | 2 ++ apps/files/ajax/rename.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/apps/files/ajax/move.php b/apps/files/ajax/move.php index 03d2a6a5624..93063e52eb0 100644 --- a/apps/files/ajax/move.php +++ b/apps/files/ajax/move.php @@ -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; diff --git a/apps/files/ajax/rename.php b/apps/files/ajax/rename.php index 2364e477d93..9fd2ce3ad4b 100644 --- a/apps/files/ajax/rename.php +++ b/apps/files/ajax/rename.php @@ -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); -- 2.39.5