From: Robin Appelman Date: Fri, 8 Feb 2013 11:03:28 +0000 (+0100) Subject: Files: explicitly define X-Git-Tag: v5.0.0alpha1~77^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9bdc43e1fcb4576c82fa03fd59deb2aa28282aba;p=nextcloud-server.git Files: explicitly define --- 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);