1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

Attempt to fix option-type

This commit is contained in:
Tim Düsterhus 2011-12-10 16:52:40 +01:00
parent 07657cfea0
commit 3df2fd39c8

View File

@ -17,4 +17,15 @@ class TimeIntervalOptionType extends TextOptionType {
public function getData(\wcf\data\option\Option $option, $newValue) { public function getData(\wcf\data\option\Option $option, $newValue) {
return \wcf\util\ChatUtil::timeModifier($newValue); return \wcf\util\ChatUtil::timeModifier($newValue);
} }
/**
* @see wcf\system\option\TextOptionType::getFormElement()
*/
public function getFormElement(\wcf\data\option\Option $option, $value) {
$tmp = (int) ($value / 60);
if ($value % 60 != 0) {
$tmp .= ','.($tmp % 60).'s';
}
parent::getFormElement($option, $tmp);
}
} }