aboutsummaryrefslogtreecommitdiffstats
path: root/theme/default/html
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2024-12-03 20:29:02 +0100
committerThomas Lange <code@nerdmind.de>2024-12-03 20:29:02 +0100
commitc594f2346bba05118b9ccc29241f85b6525821dd (patch)
tree74b65a66f086693e2b812e7390cec48a4d57b6ab /theme/default/html
parent2ac4bdca2ab38990f891371282a3a17af290e78f (diff)
downloadblog-c594f2346bba05118b9ccc29241f85b6525821dd.tar.gz
blog-c594f2346bba05118b9ccc29241f85b6525821dd.tar.xz
blog-c594f2346bba05118b9ccc29241f85b6525821dd.zip
Bugfix: Date in search form not kept after submit
Use the `==` (equal) instead of `===` (identical) comparison operator in the form template. This bug was silently introduced in 2021 with 8cd1105 in `core/include/search/main.php` where the `$FORM['OPTIONS']` array is since then filled with integer values and not string values anymore.
Diffstat (limited to 'theme/default/html')
-rw-r--r--theme/default/html/search/main.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/theme/default/html/search/main.php b/theme/default/html/search/main.php
index 336f49c..3042c33 100644
--- a/theme/default/html/search/main.php
+++ b/theme/default/html/search/main.php
@@ -12,21 +12,21 @@
<option value=""><?=$Language->text('date_d')?></option>
<?php foreach($FORM['OPTIONS']['D'] as $option): ?>
- <option value="<?=$option?>"<?=($FORM['SELECT']['D'] === $option) ? ' selected' : '' ?>><?=$option?></option>
+ <option value="<?=$option?>"<?=($FORM['SELECT']['D'] == $option) ? ' selected' : '' ?>><?=$option?></option>
<?php endforeach; ?>
</select>
<select name="m">
<option value=""><?=$Language->text('date_m')?></option>
<?php foreach($FORM['OPTIONS']['M'] as $option): ?>
- <option value="<?=$option?>"<?=($FORM['SELECT']['M'] === $option) ? ' selected' : '' ?>><?=$option?></option>
+ <option value="<?=$option?>"<?=($FORM['SELECT']['M'] == $option) ? ' selected' : '' ?>><?=$option?></option>
<?php endforeach; ?>
</select>
<select name="y">
<option value=""><?=$Language->text('date_y')?></option>
<?php foreach($FORM['OPTIONS']['Y'] as $option): ?>
- <option value="<?=$option?>"<?=($FORM['SELECT']['Y'] === $option) ? ' selected' : '' ?>><?=$option?></option>
+ <option value="<?=$option?>"<?=($FORM['SELECT']['Y'] == $option) ? ' selected' : '' ?>><?=$option?></option>
<?php endforeach; ?>
</select>