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:
parent
07657cfea0
commit
3df2fd39c8
@ -17,4 +17,15 @@ class TimeIntervalOptionType extends TextOptionType {
|
||||
public function getData(\wcf\data\option\Option $option, $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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user