diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | lib/VNDB/DB/Users.pm | 6 | ||||
-rw-r--r-- | lib/VNDB/Handler/Users.pm | 1 |
3 files changed, 5 insertions, 3 deletions
@@ -5,6 +5,7 @@ - Slightly re-organized lang.txt - Fixed perl warning on /u+/votes batchedit with nothing selected - Switched to TUWF + - Order "all notifications" with new notifications first - Bugfix: Correctly randomize screenshots on homepage with filters - Bugfix: Don't show NSFW screenshots on homepage with filters - Bugfix-API: Use ~ for the get vn search filter instead of = diff --git a/lib/VNDB/DB/Users.pm b/lib/VNDB/DB/Users.pm index bd7db201..36ae02af 100644 --- a/lib/VNDB/DB/Users.pm +++ b/lib/VNDB/DB/Users.pm @@ -178,7 +178,7 @@ sub dbSessionUpdateLastUsed { } -# %options->{ uid id what results page } +# %options->{ uid id what results page reverse } # what: titles sub dbNotifyGet { my($s, %o) = @_; @@ -210,8 +210,8 @@ sub dbNotifyGet { FROM notifications n !s !W - ORDER BY n.id - |, join(', ', @select), join(' ', @join), \%where); + ORDER BY n.id !s + |, join(', ', @select), join(' ', @join), \%where, $o{reverse} ? 'DESC' : 'ASC'); return wantarray ? ($r, $np) : $r; } diff --git a/lib/VNDB/Handler/Users.pm b/lib/VNDB/Handler/Users.pm index 44ffa60b..d46d6c22 100644 --- a/lib/VNDB/Handler/Users.pm +++ b/lib/VNDB/Handler/Users.pm @@ -586,6 +586,7 @@ sub notifies { results => 25, what => 'titles', read => $f->{r} == 1 ? undef : 0, + reverse => $f->{r} == 1, ); $self->htmlHeader(title => mt('_usern_title'), noindex => 1); |