git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e889c75
)
word/edit: search query ^ to search root categories
author
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 25 Oct 2021 14:36:10 +0000
(16:36 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Tue, 9 Nov 2021 03:14:15 +0000
(
04:14
+0100)
Also fix Unicode conversion for anything else.
word/edit.plp
patch
|
blob
|
history
diff --git
a/word/edit.plp
b/word/edit.plp
index 1aade3e4d2d64d83f283997f269765bb122eb0a9..f755f25752b76744373b4573147563c2c91214d4 100644
(file)
--- a/
word/edit.plp
+++ b/
word/edit.plp
@@
-112,7
+112,8
@@
my %wordcol = (
);
if (my $search = $fields{q}) {
- my %filter = (form => {ilike => '%'.$search.'%'});
+ my %filter = $search eq '^' ? (cat => undef, ref => undef) :
+ (form => {ilike => '%'.parseinput($search).'%'});
my $results = $db->select(word => '*', \%filter);
say '<h1>Search</h1><ul>';
printf("<li><small>%s</small> %s %s</li>\n",