diff options
author | Struan Donald <struan@fury.ukcod.org.uk> | 2011-06-02 12:48:47 +0100 |
---|---|---|
committer | Struan Donald <struan@fury.ukcod.org.uk> | 2011-06-02 12:48:47 +0100 |
commit | 7cb4041271fc211f191b7436d8c5ad8474b888bf (patch) | |
tree | a8efd93e6ab8321a745631cf28593ccf6093368f /perllib/Problems.pm | |
parent | b4019d98a9360bb0089f4109250a3fed4909725f (diff) |
display comments and updates for editing
Diffstat (limited to 'perllib/Problems.pm')
-rw-r--r-- | perllib/Problems.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/perllib/Problems.pm b/perllib/Problems.pm index fd84345e3..b742932c1 100644 --- a/perllib/Problems.pm +++ b/perllib/Problems.pm @@ -475,8 +475,8 @@ Uses any site_restriction defined by a cobrand. sub admin_fetch_problem { my ($id) = @_; - my $problem = dbh()->selectall_arrayref("select * from problem - where id=? + my $problem = dbh()->selectall_arrayref("select problem.*, users.email from problem, users + where problem.id=? and users.id = problem.user_id $site_restriction", { Slice=>{} }, $id); return $problem; } @@ -489,9 +489,10 @@ Uses any site_restriction defined by a cobrand. =cut sub admin_fetch_update { my ($id) = @_; - my $update = dbh()->selectall_arrayref("select comment.*, problem.council from comment, problem + my $update = dbh()->selectall_arrayref("select comment.*, problem.council, users.email from comment, problem, users where comment.id=? and problem.id = comment.problem_id + and users.id = comment.user_id $site_restriction", { Slice=>{} }, $id); return $update; } |