diff options
Diffstat (limited to 'perllib/FixMyStreet/Alert.pm')
-rw-r--r-- | perllib/FixMyStreet/Alert.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/Alert.pm b/perllib/FixMyStreet/Alert.pm index 90a5b1aaa..45985502f 100644 --- a/perllib/FixMyStreet/Alert.pm +++ b/perllib/FixMyStreet/Alert.pm @@ -136,18 +136,18 @@ sub email_alerts ($) { # call checks if this is the host that sends mail for this cobrand. next unless (Cobrand::email_host($row->{alert_cobrand})); - # create problem status message for the templates - $data{state_message} = - $row->{state} eq 'fixed' - ? _("This report is currently marked as fixed.") - : _("This report is currently marked as open."); - dbh()->do('insert into alert_sent (alert_id, parameter) values (?,?)', {}, $row->{alert_id}, $row->{item_id}); if ($last_alert_id && $last_alert_id != $row->{alert_id}) { _send_aggregated_alert_email(%data); %data = ( template => $alert_type->{template}, data => '' ); } + # create problem status message for the templates + $data{state_message} = + $row->{state} eq 'fixed' + ? _("This report is currently marked as fixed.") + : _("This report is currently marked as open."); + $url = Cobrand::base_url_for_emails($row->{alert_cobrand}, $row->{alert_cobrand_data}); if ($row->{item_text}) { $data{problem_url} = $url . "/report/" . $row->{id}; |