aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet.pm24
-rw-r--r--perllib/FixMyStreet/App.pm2
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm2
-rw-r--r--perllib/FixMyStreet/App/View/Web.pm2
4 files changed, 15 insertions, 15 deletions
diff --git a/perllib/FixMyStreet.pm b/perllib/FixMyStreet.pm
index d63f708d2..2d8f462d5 100644
--- a/perllib/FixMyStreet.pm
+++ b/perllib/FixMyStreet.pm
@@ -107,15 +107,15 @@ sub dbic_connect_info {
my $class = shift;
my $config = $class->config;
- my $dsn = "dbi:Pg:dbname=" . $config->{BCI_DB_NAME};
- $dsn .= ";host=$config->{BCI_DB_HOST}"
- if $config->{BCI_DB_HOST};
- $dsn .= ";port=$config->{BCI_DB_PORT}"
- if $config->{BCI_DB_PORT};
+ my $dsn = "dbi:Pg:dbname=" . $config->{FMS_DB_NAME};
+ $dsn .= ";host=$config->{FMS_DB_HOST}"
+ if $config->{FMS_DB_HOST};
+ $dsn .= ";port=$config->{FMS_DB_PORT}"
+ if $config->{FMS_DB_PORT};
$dsn .= ";sslmode=allow";
- my $user = $config->{BCI_DB_USER} || undef;
- my $password = $config->{BCI_DB_PASS} || undef;
+ my $user = $config->{FMS_DB_USER} || undef;
+ my $password = $config->{FMS_DB_PASS} || undef;
my $dbi_args = {
AutoCommit => 1,
@@ -146,11 +146,11 @@ sub configure_mysociety_dbhandle {
my $config = $class->config;
mySociety::DBHandle::configure(
- Name => $config->{BCI_DB_NAME},
- User => $config->{BCI_DB_USER},
- Password => $config->{BCI_DB_PASS},
- Host => $config->{BCI_DB_HOST} || undef,
- Port => $config->{BCI_DB_PORT} || undef,
+ Name => $config->{FMS_DB_NAME},
+ User => $config->{FMS_DB_USER},
+ Password => $config->{FMS_DB_PASS},
+ Host => $config->{FMS_DB_HOST} || undef,
+ Port => $config->{FMS_DB_PORT} || undef,
);
}
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index beea8bb11..21552a066 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -178,7 +178,7 @@ sub setup_request {
$c->model('DB::Problem')->set_restriction( $cobrand->site_restriction() );
- Memcached::set_namespace( FixMyStreet->config('BCI_DB_NAME') . ":" );
+ Memcached::set_namespace( FixMyStreet->config('FMS_DB_NAME') . ":" );
my $map = $host =~ /^osm\./ ? 'OSM' : $c->req->param('map_override');
#if ($c->sessionid) {
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index c988b23c1..04dfaf409 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -770,7 +770,7 @@ sub update_edit : Path('update_edit') : Args(1) {
# If we're hiding an update, see if it marked as fixed and unfix if so
if ( $new_state eq 'hidden' && $update->mark_fixed ) {
- if ( $update->problem->state eq 'fixed' ) {
+ if ( $update->problem->state =~ /^fixed/ ) {
$update->problem->state('confirmed');
$update->problem->update;
}
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm
index 43d46ae25..755f1e405 100644
--- a/perllib/FixMyStreet/App/View/Web.pm
+++ b/perllib/FixMyStreet/App/View/Web.pm
@@ -168,7 +168,7 @@ sub html_filter {
my %version_hash;
sub version {
my ( $self, $c, $file ) = @_;
- unless ($version_hash{$file}) {
+ unless ($version_hash{$file} && !FixMyStreet->config('STAGING_SITE')) {
my $path = FixMyStreet->path_to('web', $file);
$version_hash{$file} = ( stat( $path ) )[9];
}