[Pkg-owncloud-commits] [owncloud] 13/145: use localised date in notification mails
David Prévot
taffit at moszumanska.debian.org
Wed Feb 26 16:27:38 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit f1dc6e1441715849f7981ee195c6e8d82c9bdc23
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date: Mon Jan 27 12:47:54 2014 +0100
use localised date in notification mails
---
core/ajax/share.php | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/core/ajax/share.php b/core/ajax/share.php
index 268cd4f..8b48eff 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -121,7 +121,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
if (isset($items[0]['expiration'])) {
try {
$date = new DateTime($items[0]['expiration']);
- $expiration = $date->format('Y-m-d');
+ $expiration = $l->l('date', $date->getTimestamp());
} catch (Exception $e) {
\OCP\Util::writeLog('sharing', "Couldn't read date: " . $e->getMessage(), \OCP\Util::ERROR);
}
@@ -187,6 +187,8 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
break;
case 'email':
+ // enable l10n support
+ $l = OC_L10N::get('core');
// read post variables
$user = OCP\USER::getUser();
$displayName = OCP\User::getDisplayName();
@@ -199,16 +201,13 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
if (isset($_POST['expiration']) && $_POST['expiration'] !== '') {
try {
$date = new DateTime($_POST['expiration']);
- $expiration = $date->format('Y-m-d');
+ $expiration = $l->l('date', $date->getTimestamp());
} catch (Exception $e) {
\OCP\Util::writeLog('sharing', "Couldn't read date: " . $e->getMessage(), \OCP\Util::ERROR);
}
}
- // enable l10n support
- $l = OC_L10N::get('core');
-
// setup the email
$subject = (string)$l->t('%s shared »%s« with you', array($displayName, $file));
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list