aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Admin.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-06-13 17:46:31 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-08-09 18:32:04 +0100
commit825973c0c1d3b3bb103955fb8aea8bfe4c34d248 (patch)
tree3994de15d04405971509a5fc649699d889791999 /perllib/FixMyStreet/App/Controller/Admin.pm
parent314fc5d31215252a9f5908cd321266d3832500cb (diff)
add flagged checkbox for report editing
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Admin.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index c0e6a9475..f0a7e94b6 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -540,12 +540,15 @@ sub report_edit : Path('report_edit') : Args(1) {
$done = 1;
}
+ my $flagged = $c->req->param('flagged') ? 1 : 0;
+
# do this here so before we update the values in problem
if ( $c->req->param('anonymous') ne $problem->anonymous
|| $c->req->param('name') ne $problem->name
|| $c->req->param('email') ne $problem->user->email
|| $c->req->param('title') ne $problem->title
- || $c->req->param('detail') ne $problem->detail )
+ || $c->req->param('detail') ne $problem->detail
+ || $flagged != $problem->flagged )
{
$edited = 1;
}
@@ -555,6 +558,7 @@ sub report_edit : Path('report_edit') : Args(1) {
$problem->detail( $c->req->param('detail') );
$problem->state( $c->req->param('state') );
$problem->name( $c->req->param('name') );
+ $problem->flagged( $flagged );
if ( $c->req->param('email') ne $problem->user->email ) {
my $user = $c->model('DB::User')->find_or_create(