aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/Problems.pm5
-rwxr-xr-xweb-admin/index.cgi6
2 files changed, 7 insertions, 4 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;
}
diff --git a/web-admin/index.cgi b/web-admin/index.cgi
index 4c0b2a154..936054fe5 100755
--- a/web-admin/index.cgi
+++ b/web-admin/index.cgi
@@ -504,7 +504,9 @@ sub admin_reports {
} else {
$counciltext = $council;
}
- print $q->Tr({}, $q->td([ $url, ent($_->{title}), ent($_->{name}), ent($_->{email}),
+ my $attr = {};
+ $attr->{-class} = 'hidden' if $_->{state} eq 'hidden';
+ print $q->Tr($attr, $q->td([ $url, ent($_->{title}), ent($_->{name}), ent($_->{email}),
$counciltext,
$category, $anonymous, $cobrand, $created, $state, $whensent,
$q->a({ -href => NewURL($q, page=>'report_edit', id=>$_->{id}) }, 'Edit')
@@ -662,7 +664,7 @@ sub admin_show_updates {
}
my $cobrand = $_->{cobrand} . '<br>' . $_->{cobrand_data};
my $attr = {};
- $attr->{-class} = 'hidden' if $_->{state} eq 'hidden';
+ $attr->{-class} = 'hidden' if $_->{state} eq 'hidden' || ($_->{problem_state} && $_->{problem_state} eq 'hidden');
print $q->Tr($attr, $q->td([ $url, $_->{state}, ent($_->{name} || ''),
ent($_->{email}), $_->{created}, $cobrand, ent($_->{text}),
$q->a({ -href => NewURL($q, page=>'update_edit', id=>$_->{id}) }, 'Edit')