projects
/
GitHub
/
WoltLab
/
WCF.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a8d0ff
)
Fix empty time filter selections
author
Marcel Werk
<burntime@woltlab.com>
Tue, 19 Nov 2024 13:32:22 +0000
(14:32 +0100)
committer
Marcel Werk
<burntime@woltlab.com>
Tue, 19 Nov 2024 13:32:22 +0000
(14:32 +0100)
wcfsetup/install/files/lib/system/form/builder/field/DateRangeFormField.class.php
patch
|
blob
|
blame
|
history
wcfsetup/install/files/lib/system/gridView/filter/TimeFilter.class.php
patch
|
blob
|
blame
|
history
diff --git
a/wcfsetup/install/files/lib/system/form/builder/field/DateRangeFormField.class.php
b/wcfsetup/install/files/lib/system/form/builder/field/DateRangeFormField.class.php
index 96d8a26666cd038ac9f3c973b759dee39c91dca7..accb3f29ef186e12b715eab415ef2473dcd1fb79 100644
(file)
--- a/
wcfsetup/install/files/lib/system/form/builder/field/DateRangeFormField.class.php
+++ b/
wcfsetup/install/files/lib/system/form/builder/field/DateRangeFormField.class.php
@@
-50,7
+50,7
@@
class DateRangeFormField extends AbstractFormField implements
*/
public function getSaveValue()
{
- if (
$this->getValue() === null
&& $this->isNullable()) {
+ if (
!$this->getFromValue() && !$this->getToValue()
&& $this->isNullable()) {
return null;
}
diff --git
a/wcfsetup/install/files/lib/system/gridView/filter/TimeFilter.class.php
b/wcfsetup/install/files/lib/system/gridView/filter/TimeFilter.class.php
index 91a1889e3d3e887cd6de5d7fa4d4076fb2fdabe0..0aa876635f7514e9829fa885a6c08449c34f249c 100644
(file)
--- a/
wcfsetup/install/files/lib/system/gridView/filter/TimeFilter.class.php
+++ b/
wcfsetup/install/files/lib/system/gridView/filter/TimeFilter.class.php
@@
-22,6
+22,7
@@
class TimeFilter implements IGridViewFilter
{
return DateRangeFormField::create($id)
->label($label)
+ ->nullable()
->supportTime();
}