diff --git a/webroot/post.rvt b/webroot/post.rvt index c0537a3..9c21ad6 100644 --- a/webroot/post.rvt +++ b/webroot/post.rvt @@ -14,9 +14,17 @@ } } + unset -nocomplain whereclauses + lappend whereclauses "deleted IS NULL" + lappend whereclauses "user_id = $::user(id)" + + if {![info exists response(resubmit)]} { + lappend whereclauses "posted IS NULL" + } + puts "
    " if {[info exists idlist]} { - pg_select $::db "SELECT * FROM activities WHERE posted IS NULL AND deleted IS NULL AND id IN ([join $idlist ","])" buf { + pg_select $::db "SELECT * FROM activities WHERE [join $whereclauses " AND "] AND id IN ([join $idlist ","])" buf { set id $buf(id) if {[info exists response(notes_$id)] && $response(notes_$id) != ""} {