3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 19:52:34 +01:00

DualIndexSQLiteObject: make _sort prefix more consistent

This commit is contained in:
Pragmatic Software 2020-03-03 08:55:34 -08:00
parent 0a034814ad
commit b7240d3bdc

View File

@ -361,9 +361,10 @@ sub get_each {
} }
if ($key eq '_sort') { if ($key eq '_sort') {
if ($value =~ /^\-/) { if ($value =~ s/^\-//) {
push @sort, "$value DESC"; push @sort, "$value DESC";
} else { } else {
$value =~ s/^\+//; # optional
push @sort, "$value ASC"; push @sort, "$value ASC";
} }
next; next;