aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/export-norwegian-contacts10
-rwxr-xr-xbin/import-categories10
-rwxr-xr-xbin/load-contacts10
-rwxr-xr-xbin/load-norwegian-contacts10
-rwxr-xr-xbin/problem-creation-graph4
-rwxr-xr-xbin/problems-filed-graph4
-rwxr-xr-xbin/rotate-photos10
-rwxr-xr-xbin/send-reports4
-rwxr-xr-xbin/showcouncilrates10
-rwxr-xr-xbin/test-mailin2
-rwxr-xr-xbin/test-run4
-rwxr-xr-xbin/update-areas10
12 files changed, 46 insertions, 42 deletions
diff --git a/bin/export-norwegian-contacts b/bin/export-norwegian-contacts
index 8a7d438e5..0209c6512 100644
--- a/bin/export-norwegian-contacts
+++ b/bin/export-norwegian-contacts
@@ -31,11 +31,11 @@ use mySociety::MaPit;
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)
+ Name => mySociety::Config::get('FMS_DB_NAME'),
+ User => mySociety::Config::get('FMS_DB_USER'),
+ Password => mySociety::Config::get('FMS_DB_PASS'),
+ Host => mySociety::Config::get('FMS_DB_HOST', undef),
+ Port => mySociety::Config::get('FMS_DB_PORT', undef)
);
}
diff --git a/bin/import-categories b/bin/import-categories
index add12d3d0..e9008b93f 100755
--- a/bin/import-categories
+++ b/bin/import-categories
@@ -24,11 +24,11 @@ use mySociety::VotingArea;
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)
+ Name => mySociety::Config::get('FMS_DB_NAME'),
+ User => mySociety::Config::get('FMS_DB_USER'),
+ Password => mySociety::Config::get('FMS_DB_PASS'),
+ Host => mySociety::Config::get('FMS_DB_HOST', undef),
+ Port => mySociety::Config::get('FMS_DB_PORT', undef)
);
}
diff --git a/bin/load-contacts b/bin/load-contacts
index 0fa76ca11..b18699db1 100755
--- a/bin/load-contacts
+++ b/bin/load-contacts
@@ -23,11 +23,11 @@ use mySociety::Random;
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)
+ Name => mySociety::Config::get('FMS_DB_NAME'),
+ User => mySociety::Config::get('FMS_DB_USER'),
+ Password => mySociety::Config::get('FMS_DB_PASS'),
+ Host => mySociety::Config::get('FMS_DB_HOST', undef),
+ Port => mySociety::Config::get('FMS_DB_PORT', undef)
);
if (!dbh()->selectrow_array('select secret from secret for update of secret')) {
diff --git a/bin/load-norwegian-contacts b/bin/load-norwegian-contacts
index f7466ad2a..b73778848 100755
--- a/bin/load-norwegian-contacts
+++ b/bin/load-norwegian-contacts
@@ -25,11 +25,11 @@ use mySociety::Random;
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)
+ Name => mySociety::Config::get('FMS_DB_NAME'),
+ User => mySociety::Config::get('FMS_DB_USER'),
+ Password => mySociety::Config::get('FMS_DB_PASS'),
+ Host => mySociety::Config::get('FMS_DB_HOST', undef),
+ Port => mySociety::Config::get('FMS_DB_PORT', undef)
);
if (!dbh()->selectrow_array('select secret from secret for update of secret')) {
diff --git a/bin/problem-creation-graph b/bin/problem-creation-graph
index 6d34d3b49..4bba1cdb8 100755
--- a/bin/problem-creation-graph
+++ b/bin/problem-creation-graph
@@ -18,7 +18,7 @@ cd `dirname $0`
cd ../../
source fixmystreet/commonlib/shlib/deployfns
-read_conf fixmystreet/conf/general
+read_conf fixmystreet/conf/general.yml
if [ $OPTION_BASE_URL = "http://reportemptyhomes.com" ]; then
DATE="2008-10-01"
@@ -42,7 +42,7 @@ function grab_data {
$1
group by date(created)
order by date(created)
- ;" | psql --host $OPTION_BCI_DB_HOST --port $OPTION_BCI_DB_PORT -A -F " " $OPTION_BCI_DB_NAME $OPTION_BCI_DB_USER | egrep -v "date|rows" >$2
+ ;" | psql --host $OPTION_FMS_DB_HOST --port $OPTION_FMS_DB_PORT -A -F " " $OPTION_FMS_DB_NAME $OPTION_FMS_DB_USER | egrep -v "date|rows" >$2
}
# rather nastily, work out the cumulative heights in reverse, so can plot impulses on top of each other
diff --git a/bin/problems-filed-graph b/bin/problems-filed-graph
index 702bea651..dbac35639 100755
--- a/bin/problems-filed-graph
+++ b/bin/problems-filed-graph
@@ -18,7 +18,7 @@ cd `dirname $0`
cd ../../
source fixmystreet/commonlib/shlib/deployfns
-read_conf fixmystreet/conf/general
+read_conf fixmystreet/conf/general.yml
SOURCEO=/tmp/bci-report-rate-graph-data-nonwmc-$RANDOM$RANDOM
GPSCRIPT=/tmp/bci-report-rate-graph-script-$RANDOM$RANDOM
@@ -29,7 +29,7 @@ echo "select
where state not in ('unconfirmed', 'hidden')
group by date(created)
order by date(created)
- ;" | psql --host $OPTION_BCI_DB_HOST --port $OPTION_BCI_DB_PORT -A -F " " $OPTION_BCI_DB_NAME $OPTION_BCI_DB_USER | egrep -v "date|rows" >$SOURCEO
+ ;" | psql --host $OPTION_FMS_DB_HOST --port $OPTION_FMS_DB_PORT -A -F " " $OPTION_FMS_DB_NAME $OPTION_FMS_DB_USER | egrep -v "date|rows" >$SOURCEO
#echo "source $SOURCEO"
cat >$GPSCRIPT <<END
diff --git a/bin/rotate-photos b/bin/rotate-photos
index 84c713926..faf2748e6 100755
--- a/bin/rotate-photos
+++ b/bin/rotate-photos
@@ -24,11 +24,11 @@ use mySociety::TempFiles;
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)
+ Name => mySociety::Config::get('FMS_DB_NAME'),
+ User => mySociety::Config::get('FMS_DB_USER'),
+ Password => mySociety::Config::get('FMS_DB_PASS'),
+ Host => mySociety::Config::get('FMS_DB_HOST', undef),
+ Port => mySociety::Config::get('FMS_DB_PORT', undef)
);
}
diff --git a/bin/send-reports b/bin/send-reports
index 427d02ec8..f1d8c5742 100755
--- a/bin/send-reports
+++ b/bin/send-reports
@@ -290,6 +290,10 @@ while (my $row = $unsent->next) {
$result *= 0;
} else {
$result *= 1;
+ # temporary fix to resolve some issues with west berks
+ if ( $row->council =~ /2619/ ) {
+ $result *= 0;
+ }
}
}
}
diff --git a/bin/showcouncilrates b/bin/showcouncilrates
index e4e9487de..1dacae597 100755
--- a/bin/showcouncilrates
+++ b/bin/showcouncilrates
@@ -16,11 +16,11 @@ use FixMyStreet::Geocode::OSM;
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)
+ Name => mySociety::Config::get('FMS_DB_NAME'),
+ User => mySociety::Config::get('FMS_DB_USER'),
+ Password => mySociety::Config::get('FMS_DB_PASS'),
+ Host => mySociety::Config::get('FMS_DB_HOST', undef),
+ Port => mySociety::Config::get('FMS_DB_PORT', undef)
);
}
diff --git a/bin/test-mailin b/bin/test-mailin
index 96e2022c0..3f101b438 100755
--- a/bin/test-mailin
+++ b/bin/test-mailin
@@ -29,7 +29,7 @@ use mySociety::WebTestHarness;
print_log('notice', "started");
our $wth = new mySociety::WebTestHarness();
-$wth->database_connect('BCI_');
+$wth->database_connect('FMS_');
print_log('notice', "reading mail from STDIN");
my $slurped = read_file(\*STDIN);
print_log('notice', "calling email_incoming");
diff --git a/bin/test-run b/bin/test-run
index 58cf0b2ea..29e975ce4 100755
--- a/bin/test-run
+++ b/bin/test-run
@@ -5,7 +5,7 @@
#
# Requires:
# * ../conf/general file set up for FixMyStreet, and matching the below requirements
-# * apache configured to serve ../web on OPTION_BASE_URL
+# * apache configured to serve ../web on BASE_URL
# * a database with name ending "_testharness"; this script will drop and remake the
# database, so make sure it is never used for anything important
# * email addresses (email_n below) configured to pipe to ./test-mailin with fast
@@ -54,7 +54,7 @@ date_print("Set up web test harness...");
my ($wth, $action, $verbose, $pause, $multispawn) = mySociety::WebTestHarness::setup({
actions => \@actions,
actions_desc => \%actions_desc,
- dbname => 'BCI',
+ dbname => 'FMS',
'sql_extra' => ['../db/alert_types.sql'],
});
$multispawn = 1;
diff --git a/bin/update-areas b/bin/update-areas
index bbc933faf..a8cc01769 100755
--- a/bin/update-areas
+++ b/bin/update-areas
@@ -24,11 +24,11 @@ use mySociety::VotingArea;
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)
+ Name => mySociety::Config::get('FMS_DB_NAME'),
+ User => mySociety::Config::get('FMS_DB_USER'),
+ Password => mySociety::Config::get('FMS_DB_PASS'),
+ Host => mySociety::Config::get('FMS_DB_HOST', undef),
+ Port => mySociety::Config::get('FMS_DB_PORT', undef)
);
}