aboutsummaryrefslogtreecommitdiffstats
path: root/core/ajax/share.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/ajax/share.php')
-rw-r--r--core/ajax/share.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php
index 86ee018e388..ca1951ec9ae 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -145,10 +145,17 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
}
$result = $mailNotification->sendLinkShareMail($to_address, $file, $link, $expiration);
- if($result === true) {
+ if(empty($result)) {
\OCP\JSON::success();
} else {
- \OCP\JSON::error(array('data' => array('message' => OC_Util::sanitizeHTML($result))));
+ $l = OC_L10N::get('core');
+ OCP\JSON::error(array(
+ 'data' => array(
+ 'message' => $l->t("Couldn't send mail to following users: %s ",
+ implode(', ', $result)
+ )
+ )
+ ));
}
break;