diff options
author | Dave Whiteland <dave@mysociety.org> | 2012-05-29 15:57:41 +0100 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2012-05-29 15:57:41 +0100 |
commit | 67da8efc720d2d0bd22bd9fe8655b7e983b35bb4 (patch) | |
tree | 38b8570647124df06c637d4b923f6010211ef328 /perllib/FixMyStreet/App/Controller/Alert.pm | |
parent | 40b3a51d33caefa8f5fb97ce9be18ef936c7e260 (diff) | |
parent | 131ff6e9bf3626d6a8fff6ae54669d250148a63a (diff) |
Merge remote branch 'origin/master' into fmb-read-only
Conflicts:
bin/send-reports
perllib/FixMyStreet/Cobrand/Default.pm
perllib/FixMyStreet/Cobrand/FixMyStreet.pm
templates/web/fixmystreet/alert/index.html
templates/web/fixmystreet/around/display_location.html
web/cobrands/fixmystreet/_layout.scss
web/js/map-OpenLayers.js
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Alert.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Alert.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Alert.pm b/perllib/FixMyStreet/App/Controller/Alert.pm index 2698c6ac0..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; } @@ -470,6 +474,7 @@ sub add_recent_photos : Private { { $c->stash->{photos} = $c->cobrand->recent_photos( + 'alert', $num_photos, $c->stash->{latitude}, $c->stash->{longitude}, @@ -477,7 +482,7 @@ sub add_recent_photos : Private { ); } else { - $c->stash->{photos} = $c->cobrand->recent_photos($num_photos); + $c->stash->{photos} = $c->cobrand->recent_photos('alert', $num_photos); } return 1; |