Add fu->redirect, change $st->row behavior on 0 results, minor fixes
And with this, I have a working rewrite of the manned.org backend into FU. \o/ The $st->row methods are very useful even for queries that may not return anything, so their old behavior was unhelpful. Interestingly enough, the error-on-multiple-rows did catch an actual bug in Manned.org, so I'm keeping that behavior.
This commit is contained in:
parent
fbbaa23842
commit
06e2f950fe
9 changed files with 62 additions and 34 deletions
|
|
@ -38,7 +38,7 @@ sub uri_unescape :prototype($) ($s) {
|
|||
sub query_decode :prototype($) ($s) {
|
||||
my %o;
|
||||
for (split /&/, $s//'') {
|
||||
my($k,$v) = map uri_unescape($_), split /=/;
|
||||
my($k,$v) = map uri_unescape($_), split /=/, $_, 2;
|
||||
$v //= builtin::true;
|
||||
if (ref $o{$k}) { push $o{$k}->@*, $v }
|
||||
elsif (exists $o{$k}) { $o{$k} = [ $o{$k}, $v ] }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue