From: Marcel Werk Date: Sun, 28 Apr 2013 14:34:04 +0000 (+0200) Subject: Fixed future timestamps X-Git-Tag: 2.0.0_Beta_1~289 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3ce1cb95f7e3b44b5343c9a4caf25543cc4eaa86;p=GitHub%2FWoltLab%2FWCF.git Fixed future timestamps --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 9ade67bd23..c9c64d58e3 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -2399,6 +2399,9 @@ WCF.Date.Time = Class.extend({ var $time = $element.data('time'); var $offset = $element.data('offset'); + // skip for future dates + if ($element.data('isFutureDate')) return; + // timestamp is less than 60 minutes ago (display 1 hour ago rather than 60 minutes ago) if ($timestamp >= this._timestamp || this._timestamp < ($timestamp + 3540)) { var $minutes = Math.max(Math.round((this._timestamp - $timestamp) / 60), 1); diff --git a/wcfsetup/install/files/lib/system/template/plugin/TimeModifierTemplatePlugin.class.php b/wcfsetup/install/files/lib/system/template/plugin/TimeModifierTemplatePlugin.class.php index 2f4de6f2aa..677d7c4ddf 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/TimeModifierTemplatePlugin.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/TimeModifierTemplatePlugin.class.php @@ -30,6 +30,6 @@ class TimeModifierTemplatePlugin implements IModifierTemplatePlugin { $time = DateUtil::format($dateTimeObject, DateUtil::TIME_FORMAT); $dateTime = str_replace('%time%', $time, str_replace('%date%', $date, WCF::getLanguage()->get('wcf.date.dateTimeFormat'))); - return ''; + return ''; } }