diff options
Diffstat (limited to 'web/alert.cgi')
-rwxr-xr-x | web/alert.cgi | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/web/alert.cgi b/web/alert.cgi index c6a6eb647..46eef082b 100755 --- a/web/alert.cgi +++ b/web/alert.cgi @@ -13,7 +13,7 @@ use Standard; use Digest::SHA1 qw(sha1_hex); use Error qw(:try); use CrossSell; -use mySociety::Alert; +use FixMyStreet::Alert; use mySociety::AuthToken; use mySociety::Config; use mySociety::DBHandle qw(select_all); @@ -446,8 +446,8 @@ sub alert_signed_input { my $out; my $cobrand = Page::get_cobrand($q); if ($signed_email eq sha1_hex("$id-$email-$salt-$secret")) { - my $alert_id = mySociety::Alert::create($email, 'new_updates', $cobrand, '', $id); - mySociety::Alert::confirm($alert_id); + my $alert_id = FixMyStreet::Alert::create($email, 'new_updates', $cobrand, '', $id); + FixMyStreet::Alert::confirm($alert_id); $out = $q->p(_('You have successfully subscribed to that alert.')); my $cobrand = Page::get_cobrand($q); my $display_advert = Cobrand::allow_crosssell_adverts($cobrand); @@ -476,14 +476,14 @@ sub alert_token { my $message; my $display_advert = Cobrand::allow_crosssell_adverts($cobrand); if ($type eq 'subscribe') { - mySociety::Alert::confirm($id); + FixMyStreet::Alert::confirm($id); $message = _('You have successfully confirmed your alert.'); $out = $q->p($message); if ($display_advert) { $out .= CrossSell::display_advert($q, $email); } } elsif ($type eq 'unsubscribe') { - mySociety::Alert::delete($id); + FixMyStreet::Alert::delete($id); $message = _('You have successfully deleted your alert.'); $out = $q->p($message); if ($display_advert) { @@ -517,22 +517,22 @@ sub alert_do_subscribe { my $cobrand_data = Cobrand::extra_alert_data($cobrand, $q); if ($type eq 'updates') { my $id = $q->param('id'); - $alert_id = mySociety::Alert::create($email, 'new_updates', $cobrand, $cobrand_data, $id); + $alert_id = FixMyStreet::Alert::create($email, 'new_updates', $cobrand, $cobrand_data, $id); } elsif ($type eq 'problems') { - $alert_id = mySociety::Alert::create($email, 'new_problems', $cobrand, $cobrand_data); + $alert_id = FixMyStreet::Alert::create($email, 'new_problems', $cobrand, $cobrand_data); } elsif ($type eq 'local') { my $feed = $q->param('feed'); if ($feed =~ /^area:(?:\d+:)?(\d+)/) { - $alert_id = mySociety::Alert::create($email, 'area_problems', $cobrand, $cobrand_data, $1); + $alert_id = FixMyStreet::Alert::create($email, 'area_problems', $cobrand, $cobrand_data, $1); } elsif ($feed =~ /^council:(\d+)/) { - $alert_id = mySociety::Alert::create($email, 'council_problems', $cobrand, $cobrand_data, $1, $1); + $alert_id = FixMyStreet::Alert::create($email, 'council_problems', $cobrand, $cobrand_data, $1, $1); } elsif ($feed =~ /^ward:(\d+):(\d+)/) { - $alert_id = mySociety::Alert::create($email, 'ward_problems', $cobrand, $cobrand_data, $1, $2); + $alert_id = FixMyStreet::Alert::create($email, 'ward_problems', $cobrand, $cobrand_data, $1, $2); } elsif ($feed =~ /^local:(\d+):(\d+)/) { - $alert_id = mySociety::Alert::create($email, 'local_problems', $cobrand, $cobrand_data, $1, $2); + $alert_id = FixMyStreet::Alert::create($email, 'local_problems', $cobrand, $cobrand_data, $1, $2); } } else { - throw mySociety::Alert::Error('Invalid type'); + throw FixMyStreet::Alert::Error('Invalid type'); } my %h = (); |