diff options
author | Matthew Somerville <matthew@cake.ukcod.org.uk> | 2010-04-20 13:41:48 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@cake.ukcod.org.uk> | 2010-04-20 13:41:48 +0100 |
commit | 031843a56c085b2e13d168f41e9d954fc606d7b2 (patch) | |
tree | 305e8a3ebab10f3df8830d537f933ef631d874c2 /perllib/Problems.pm | |
parent | 5adb298525d9919e6008cf94d79855a99b758578 (diff) |
Show updates on hidden reports as hidden.
Diffstat (limited to 'perllib/Problems.pm')
-rw-r--r-- | perllib/Problems.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/perllib/Problems.pm b/perllib/Problems.pm index 404717705..c9caf41f2 100644 --- a/perllib/Problems.pm +++ b/perllib/Problems.pm @@ -348,12 +348,13 @@ sub update_search { my ($search) = @_; my $search_n = 0; $search_n = int($search) if $search =~ /^\d+$/; - my $updates = select_all("select comment.*, problem.council from comment, problem where problem.id = comment.problem_id + my $updates = select_all("select comment.*, problem.council, problem.state as problem_state + from comment, problem where problem.id = comment.problem_id and (comment.id=? or problem_id=? or comment.email ilike '%'||?||'%' or comment.name ilike '%'||?||'%' or comment.text ilike '%'||?||'%' or comment.cobrand_data ilike '%'||?||'%') $site_restriction - order by (comment.state='hidden'),created", $search_n, $search_n, $search, $search, + order by (comment.state='hidden'),(problem.state='hidden'),created", $search_n, $search_n, $search, $search, $search, $search); return $updates; } |