aboutsummaryrefslogtreecommitdiffstats
path: root/bin/send-alerts
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-06-06 09:20:38 +0100
committerStruan Donald <struan@exo.org.uk>2011-06-06 09:20:38 +0100
commit819a95ae17f59f1732379926f9738caeb9ff046b (patch)
tree743c52675d1738618557f46f853ac46dd8b8530f /bin/send-alerts
parente26bc99396d3eaefc3fd7d81c010dc4028767690 (diff)
parentb388fd0be5296426225089ed188b3c1cdd802415 (diff)
Merge branch 'migrate_to_catalyst' of ssh://git.mysociety.org/data/git/public/fixmystreet into migrate_to_catalyst
Diffstat (limited to 'bin/send-alerts')
-rwxr-xr-xbin/send-alerts25
1 files changed, 3 insertions, 22 deletions
diff --git a/bin/send-alerts b/bin/send-alerts
index c52af4059..89dc18ee7 100755
--- a/bin/send-alerts
+++ b/bin/send-alerts
@@ -5,37 +5,18 @@
#
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org. WWW: http://www.mysociety.org
-#
-# $Id: send-alerts,v 1.5 2010-01-06 16:50:25 louise Exp $
use strict;
require 5.8.0;
use CGI; # XXX
-
-# Horrible boilerplate to set up appropriate library paths.
-use FindBin;
-use lib "$FindBin::Bin/../perllib";
-use lib "$FindBin::Bin/../commonlib/perllib";
use CronFns;
use mySociety::Config;
-use mySociety::DBHandle qw(dbh);
-use FixMyStreet::Alert;
-
-BEGIN {
- mySociety::Config::set_file("$FindBin::Bin/../conf/general");
- mySociety::DBHandle::configure(
- Name => mySociety::Config::get('BCI_DB_NAME'),
- User => mySociety::Config::get('BCI_DB_USER'),
- Password => mySociety::Config::get('BCI_DB_PASS'),
- Host => mySociety::Config::get('BCI_DB_HOST', undef),
- Port => mySociety::Config::get('BCI_DB_PORT', undef)
- );
-}
+use FixMyStreet::App;
my $site = CronFns::site(mySociety::Config::get('BASE_URL'));
CronFns::language($site);
-my $testing_email = mySociety::Config::get('TESTING_EMAIL');
-FixMyStreet::Alert::email_alerts($testing_email);
+
+FixMyStreet::App->model('DB::AlertType')->email_alerts();