summaryrefslogtreecommitdiffstats
path: root/apps/files/ajax
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-01-14 23:41:34 +0100
committerThomas Mueller <thomas.mueller@tmit.eu>2013-01-14 23:41:34 +0100
commit388bb6a5e1e8465b11f33f1820f023db271ba9d9 (patch)
tree6fee16bd0151b051cfabd97db9d285e6b8b69c29 /apps/files/ajax
parente475c26f1ae3adec2716b4ba59f92382db2bc24e (diff)
parent71ae41716a56305ab9509571c0a84311b9f3eb63 (diff)
downloadnextcloud-server-388bb6a5e1e8465b11f33f1820f023db271ba9d9.tar.gz
nextcloud-server-388bb6a5e1e8465b11f33f1820f023db271ba9d9.zip
Merge branch 'master' into fixing-unused-and-undefined-in-master
Diffstat (limited to 'apps/files/ajax')
-rw-r--r--apps/files/ajax/move.php5
-rw-r--r--apps/files/ajax/rename.php6
2 files changed, 6 insertions, 5 deletions
diff --git a/apps/files/ajax/move.php b/apps/files/ajax/move.php
index 5612716b7e4..4ebc3f42d9f 100644
--- a/apps/files/ajax/move.php
+++ b/apps/files/ajax/move.php
@@ -11,14 +11,15 @@ $dir = stripslashes($_GET["dir"]);
$file = stripslashes($_GET["file"]);
$target = stripslashes(rawurldecode($_GET["target"]));
+$l=OC_L10N::get('files');
if(OC_Filesystem::file_exists($target . '/' . $file)) {
- OCP\JSON::error(array("data" => array( "message" => "Could not move $file - File with this name already exists" )));
+ OCP\JSON::error(array("data" => array( "message" => $l->t("Could not move %s - File with this name already exists", array($file)) )));
exit;
}
if(OC_Files::move($dir, $file, $target, $file)) {
OCP\JSON::success(array("data" => array( "dir" => $dir, "files" => $file )));
} else {
- OCP\JSON::error(array("data" => array( "message" => "Could not move $file" )));
+ OCP\JSON::error(array("data" => array( "message" => $l->t("Could not move %s", array($file)) )));
}
diff --git a/apps/files/ajax/rename.php b/apps/files/ajax/rename.php
index cb0bec399d1..89b4d4bba73 100644
--- a/apps/files/ajax/rename.php
+++ b/apps/files/ajax/rename.php
@@ -14,7 +14,7 @@ $newname = stripslashes($_GET["newname"]);
// Delete
if( $newname !== '.' and OC_Files::move( $dir, $file, $dir, $newname )) {
OCP\JSON::success(array("data" => array( "dir" => $dir, "file" => $file, "newname" => $newname )));
-}
-else{
- OCP\JSON::error(array("data" => array( "message" => "Unable to rename file" )));
+} else {
+ $l=OC_L10N::get('files');
+ OCP\JSON::error(array("data" => array( "message" => $l->t("Unable to rename file") )));
}