aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Alert.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-05-23 23:56:21 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-05-23 23:56:21 +0100
commit33b23609ea599eef8cbaa791a2c4e8baf97ec865 (patch)
treed25e53bbe50a8aec40b926761c2da09c91c328c6 /perllib/FixMyStreet/App/Controller/Alert.pm
parent5416244d00afe75508f57b4a2a75be23ce7c1b49 (diff)
parentcc7c785bf5a96efa883565f03cfadd35ada6177b (diff)
Merge branch 'master' into bromley
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Alert.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Alert.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Alert.pm b/perllib/FixMyStreet/App/Controller/Alert.pm
index c127b7460..6e9ae819c 100644
--- a/perllib/FixMyStreet/App/Controller/Alert.pm
+++ b/perllib/FixMyStreet/App/Controller/Alert.pm
@@ -191,7 +191,11 @@ sub create_alert : Private {
$alert->insert();
}
- $alert->confirm() if $c->user && $c->user->id == $alert->user->id;
+ if ( $c->user && $c->user->id == $alert->user->id ) {
+ $alert->confirm();
+ } else {
+ $alert->confirmed(0);
+ }
$c->stash->{alert} = $alert;
}