From 42bddb1cc2df7568c62fe5aa5c2b5b228c208a02 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Sat, 15 Nov 2008 13:37:03 +0100 Subject: Added edits/newly created pages filter History browser is now pretty much done --- lib/VNDB/DB/Misc.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/VNDB/DB/Misc.pm') 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 = ( -- cgit v1.2.3