summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/ajax/undelete.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin/ajax/undelete.php')
-rw-r--r--apps/files_trashbin/ajax/undelete.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/files_trashbin/ajax/undelete.php b/apps/files_trashbin/ajax/undelete.php
index ee1c64aaaf2..cc010979c51 100644
--- a/apps/files_trashbin/ajax/undelete.php
+++ b/apps/files_trashbin/ajax/undelete.php
@@ -22,7 +22,7 @@ foreach ($list as $file) {
$timestamp = null;
}
- if ( !OCA_Trash\Trashbin::restore($file, $filename, $timestamp) ) {
+ if ( !OCA\Files_Trashbin\Trashbin::restore($file, $filename, $timestamp) ) {
$error[] = $filename;
} else {
$success[$i]['filename'] = $file;
@@ -37,8 +37,10 @@ if ( $error ) {
foreach ( $error as $e ) {
$filelist .= $e.', ';
}
- OCP\JSON::error(array("data" => array("message" => "Couldn't restore ".rtrim($filelist,', '), "success" => $success, "error" => $error)));
+ $l = OC_L10N::get('files_trashbin');
+ $message = $l->t("Couldn't restore %s", array(rtrim($filelist,', ')));
+ OCP\JSON::error(array("data" => array("message" => $message,
+ "success" => $success, "error" => $error)));
} else {
OCP\JSON::success(array("data" => array("success" => $success)));
}
-