diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-05-23 23:56:01 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-05-23 23:56:01 +0100 |
commit | cc7c785bf5a96efa883565f03cfadd35ada6177b (patch) | |
tree | a6d941526648a9efb6e683a045eaec0c9249865c /perllib/FixMyStreet/App/Controller/Alert.pm | |
parent | 3b0e39a4c89e4c184f30c6131936dc63845d6a1f (diff) |
Assume alert is not confirmed if not logged in.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Alert.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Alert.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Alert.pm b/perllib/FixMyStreet/App/Controller/Alert.pm index 2698c6ac0..4407e06ce 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; } |