From 90d8f42d7c5b8c8c064af8ab74e181d5e5471522 Mon Sep 17 00:00:00 2001 From: Volkan Gezer Date: Tue, 29 Jul 2014 17:47:42 +0200 Subject: [PATCH 1/3] typo fix from transifex suggestion --- lib/private/share/share.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 0c42853302..88a28adb75 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -955,8 +955,8 @@ class Share extends \OC\Share\Constants { $maxDays = \OCP\Config::getAppValue('core', 'shareapi_expire_after_n_days', '7'); $maxDate->add(new \DateInterval('P' . $maxDays . 'D')); if ($date > $maxDate) { - $warning = 'Can not set expire date. Shares can not expire later then ' . $maxDays . ' after they where shared'; - $warning_t = $l->t('Can not set expire date. Shares can not expire later then %s after they where shared', array($maxDays)); + $warning = 'Can not set expire date. Shares can not expire later than ' . $maxDays . ' after they where shared'; + $warning_t = $l->t('Can not set expire date. Shares can not expire later than %s after they where shared', array($maxDays)); \OCP\Util::writeLog('OCP\Share', $warning, \OCP\Util::WARN); throw new \Exception($warning_t); } From 5f015067f442cc498f4e8d0634a2ee5719398528 Mon Sep 17 00:00:00 2001 From: Volkan Gezer Date: Fri, 1 Aug 2014 01:39:52 +0200 Subject: [PATCH 2/3] suggestions by deepdiver --- lib/private/share/share.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 88a28adb75..4b5724688d 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -955,16 +955,16 @@ class Share extends \OC\Share\Constants { $maxDays = \OCP\Config::getAppValue('core', 'shareapi_expire_after_n_days', '7'); $maxDate->add(new \DateInterval('P' . $maxDays . 'D')); if ($date > $maxDate) { - $warning = 'Can not set expire date. Shares can not expire later than ' . $maxDays . ' after they where shared'; - $warning_t = $l->t('Can not set expire date. Shares can not expire later than %s after they where shared', array($maxDays)); + $warning = 'Cannot set expiration date. Shares cannot expire later than ' . $maxDays . ' after they where shared'; + $warning_t = $l->t('Cannot set expiration date. Shares cannot expire later than %s after they where shared', array($maxDays)); \OCP\Util::writeLog('OCP\Share', $warning, \OCP\Util::WARN); throw new \Exception($warning_t); } } if ($date < $today) { - $message = 'Can not set expire date. Expire date is in the past'; - $message_t = $l->t('Can not set expire date. Expire date is in the past'); + $message = 'Cannot set expiration date. Expire date is in the past'; + $message_t = $l->t('Cannot set expiration date. Expire date is in the past'); \OCP\Util::writeLog('OCP\Share', $message, \OCP\Util::WARN); throw new \Exception($message_t); } From 7a07690b250e799474fdbc73ace4ead5c2906b75 Mon Sep 17 00:00:00 2001 From: Volkan Gezer Date: Sat, 2 Aug 2014 04:02:39 +0200 Subject: [PATCH 3/3] expire -> expiration --- lib/private/share/share.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 4b5724688d..c6cdeb2d2d 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -925,7 +925,7 @@ class Share extends \OC\Share\Constants { } /** - * validate expire date if it meets all constraints + * validate expiration date if it meets all constraints * * @param string $expireDate well formate date string, e.g. "DD-MM-YYYY" * @param string $shareTime timestamp when the file was shared @@ -963,8 +963,8 @@ class Share extends \OC\Share\Constants { } if ($date < $today) { - $message = 'Cannot set expiration date. Expire date is in the past'; - $message_t = $l->t('Cannot set expiration date. Expire date is in the past'); + $message = 'Cannot set expiration date. Expiration date is in the past'; + $message_t = $l->t('Cannot set expiration date. Expiration date is in the past'); \OCP\Util::writeLog('OCP\Share', $message, \OCP\Util::WARN); throw new \Exception($message_t); } @@ -1017,10 +1017,10 @@ class Share extends \OC\Share\Constants { $result = false; - // only use default expire date for link shares + // only use default expiration date for link shares if ((int) $item['share_type'] === self::SHARE_TYPE_LINK) { - // calculate expire date + // calculate expiration date if (!empty($item['expiration'])) { $userDefinedExpire = new \DateTime($item['expiration']); $expires = $userDefinedExpire->getTimestamp(); @@ -1029,7 +1029,7 @@ class Share extends \OC\Share\Constants { } - // get default expire settings + // get default expiration settings $defaultSettings = Helper::getDefaultExpireSetting(); $expires = Helper::calculateExpireDate($defaultSettings, $item['stime'], $expires);