]> source.dussan.org Git - nextcloud-server.git/commitdiff
Files: explicitly define
authorRobin Appelman <icewind@owncloud.com>
Fri, 8 Feb 2013 11:03:28 +0000 (12:03 +0100)
committerRobin Appelman <icewind@owncloud.com>
Fri, 8 Feb 2013 11:03:28 +0000 (12:03 +0100)
apps/files/ajax/move.php
apps/files/ajax/rename.php

index 03d2a6a5624a286af2b6d3c4d2ad17b1f26628af..93063e52eb09ae017617bcce6e6b76d1d54e57a6 100644 (file)
@@ -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;
index 2364e477d936d62c1342d7ddfdb66059eacb3cb7..9fd2ce3ad4bc6d548aeb3a609e45863707ea7df7 100644 (file)
@@ -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);