diff options
author | Yorhel <git@yorhel.nl> | 2008-11-15 12:52:06 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2008-11-15 12:52:06 +0100 |
commit | 0c18982e5f21fdf5027a4c079bcbaf7750fe0d1b (patch) | |
tree | df203a15cee7b7201e6d9492124ccf8ff2506c72 /lib/VNDB/DB | |
parent | c6c8b37d60dfd8943a860043f61a9344ddb1dda6 (diff) |
Automated edits filter
Currently relies on the fact that Multi is the only one making the
automated edits
Diffstat (limited to 'lib/VNDB/DB')
-rw-r--r-- | lib/VNDB/DB/Misc.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/VNDB/DB/Misc.pm b/lib/VNDB/DB/Misc.pm index 2a88d756..df3d7790 100644 --- a/lib/VNDB/DB/Misc.pm +++ b/lib/VNDB/DB/Misc.pm @@ -82,11 +82,12 @@ sub dbItemInsert { } -# Options: type, iid, uid, page, results +# Options: type, iid, uid, auto, page, results sub dbRevisionGet { my($self, %o) = @_; $o{results} ||= 10; $o{page} ||= 1; + $o{auto} ||= 0; # 0: show, -1:only, 1:hide my %where = ( $o{type} ? ( @@ -95,6 +96,8 @@ sub dbRevisionGet { '!sr.!sid = ?' => [ $o{type}, $o{type}, $o{iid} ] ) : (), $o{uid} ? ( 'c.requester = ?' => $o{uid} ) : (), + $o{auto} ? ( + 'c.requester !s 1' => $o{auto} < 0 ? '=' : '<>' ) : (), ); my @join = ( |