aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-02-08 12:03:28 +0100
committerRobin Appelman <icewind@owncloud.com>2013-02-08 12:03:28 +0100
commit9bdc43e1fcb4576c82fa03fd59deb2aa28282aba (patch)
treed3efe8e7204f73eecbdf50f387c9e767fd9b4e86 /apps/files
parent5ef9d96d10c2984f0a5c19f299312492387b5aec (diff)
downloadnextcloud-server-9bdc43e1fcb4576c82fa03fd59deb2aa28282aba.tar.gz
nextcloud-server-9bdc43e1fcb4576c82fa03fd59deb2aa28282aba.zip
Files: explicitly define
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/ajax/move.php2
-rw-r--r--apps/files/ajax/rename.php2
2 files changed, 4 insertions, 0 deletions
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);