diff options
author | Yorhel <git@yorhel.nl> | 2015-06-15 19:00:59 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2015-06-15 19:01:31 +0200 |
commit | 9b5895c7a6d2dc1cbb7587215bebbbf293a2ab49 (patch) | |
tree | 995cddeef6b873dfed3ebe9d92f371abfe8b07de /lib/VNDB/DB/Users.pm | |
parent | a39054f37df8e69d512c26a76cbc9b20d4561200 (diff) |
d7: Replace "top 5 contributors" with "special users" listing
Having a proper and up-to-date list of moderators is an often requested
feature.
Diffstat (limited to 'lib/VNDB/DB/Users.pm')
-rw-r--r-- | lib/VNDB/DB/Users.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/VNDB/DB/Users.pm b/lib/VNDB/DB/Users.pm index 90a371a8..ec8d707b 100644 --- a/lib/VNDB/DB/Users.pm +++ b/lib/VNDB/DB/Users.pm @@ -13,7 +13,7 @@ our @EXPORT = qw| |; -# %options->{ username passwd mail session uid ip registered search results page what sort reverse } +# %options->{ username passwd mail session uid ip registered search results page what sort reverse notperm } # what: notifycount stats extended prefs hide_list # sort: username registered votes changes tags sub dbUserGet { @@ -50,6 +50,8 @@ sub dbUserGet { 'username ILIKE ?' => "%$o{search}%") : (), $o{session} ? ( q|s.token = decode(?, 'hex')| => unpack 'H*', $o{session} ) : (), + $o{notperm} ? ( + 'perm & ~(?::smallint) > 0' => $o{notperm} ) : (), ); my @select = ( @@ -77,6 +79,7 @@ sub dbUserGet { ); my $order = sprintf { + id => 'u.id %s', username => 'u.username %s', registered => 'u.registered %s', votes => 'up.value NULLS FIRST, u.c_votes %s', |