diff --git a/file/lib/system/option/TimeIntervalOptionType.class.php b/file/lib/system/option/TimeIntervalOptionType.class.php index 0d6afb1..c7d0339 100644 --- a/file/lib/system/option/TimeIntervalOptionType.class.php +++ b/file/lib/system/option/TimeIntervalOptionType.class.php @@ -22,10 +22,20 @@ public function getData(\wcf\data\option\Option $option, $newValue) { * @see \wcf\system\option\TextOptionType::getFormElement() */ public function getFormElement(\wcf\data\option\Option $option, $value) { - $tmp = (int) ($value / 60); + $tmp = ''; + if ($value > 86400) { + $tmp = floor($value / 86400).'d'; + $value -= floor($value / 86400) * 86400; + } + if ($value > 3600) { + $tmp .= floor($value / 3600).'h'; + $value -= floor($value / 3600) * 3600; + } + $tmp .= floor($value / 60); if ($value % 60 != 0) { $tmp .= ','.($value % 60).'s'; } + return parent::getFormElement($option, $tmp); } } diff --git a/file/lib/util/ChatUtil.class.php b/file/lib/util/ChatUtil.class.php index 7f3c1d2..7336d97 100644 --- a/file/lib/util/ChatUtil.class.php +++ b/file/lib/util/ChatUtil.class.php @@ -75,7 +75,7 @@ public static function getDiedUsers() { $stmt = WCF::getDB()->prepareStatement($sql); $stmt->execute(array('lastActivity', 'roomID', $time - 30)); $users = array(); - while ($users[] = $stmt->fetchArray()); + while ($user = $stmt->fetchArray()) $users[] = $user; return $users; } diff --git a/option.xml b/option.xml index 8f460ab..2a88897 100644 --- a/option.xml +++ b/option.xml @@ -72,7 +72,7 @@