aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Alert.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Alert.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Alert.pm9
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;