diff options
author | Yorhel <git@yorhel.nl> | 2008-11-15 13:37:03 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2008-11-15 13:37:03 +0100 |
commit | 42bddb1cc2df7568c62fe5aa5c2b5b228c208a02 (patch) | |
tree | 00049ad571ab0c52d2489946330a3005c1914896 /lib/VNDB/DB/Misc.pm | |
parent | d97f5a7658a7a9029ada1b1d0a3a3bac9d031f6e (diff) |
Added edits/newly created pages filter
History browser is now pretty much done
Diffstat (limited to 'lib/VNDB/DB/Misc.pm')
-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 3469dc17..6fb82801 100644 --- a/lib/VNDB/DB/Misc.pm +++ b/lib/VNDB/DB/Misc.pm @@ -82,13 +82,14 @@ sub dbItemInsert { } -# Options: type, iid, uid, auto, hidden, page, results +# Options: type, iid, uid, auto, hidden, edit, page, results sub dbRevisionGet { my($self, %o) = @_; $o{results} ||= 10; $o{page} ||= 1; $o{auto} ||= 0; # 0:show, -1:only, 1:hide $o{hidden} ||= 0; + $o{edit} ||= 0; # 0:both, -1:new, 1:edits my %where = ( $o{type} ? ( @@ -104,6 +105,8 @@ sub dbRevisionGet { ) : $o{hidden} == -1 ? ( '(v.hidden IS NOT NULL AND v.hidden = TRUE OR r.hidden IS NOT NULL AND r.hidden = TRUE OR p.hidden IS NOT NULL AND p.hidden = TRUE)' => 1, ) : (), + $o{edit} ? ( + 'c.rev !s 1' => $o{edit} < 0 ? '=' : '>' ) : (), ); my @join = ( |