aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Questionnaire.pm
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2015-10-27 13:27:03 +0100
committerMarius Halden <marius.h@lden.org>2015-10-27 13:27:03 +0100
commit4fb5331abd2fa4c89ebeb89bc92a245fadd0aa19 (patch)
tree23632b448612e3845a6e8b1aed6490151395de2a /perllib/FixMyStreet/App/Controller/Questionnaire.pm
parente609613b5041a15491417eaa9ae129dd1e7531dd (diff)
parentac39951581a0eefe069c8a707bb89977227d0bce (diff)
Merge tag 'v1.7' into fiksgatami-dev
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Questionnaire.pm')
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Questionnaire.pm14
1 files changed, 8 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Questionnaire.pm b/perllib/FixMyStreet/App/Controller/Questionnaire.pm
index f9a08e408..8fe2514c0 100755
--- a/perllib/FixMyStreet/App/Controller/Questionnaire.pm
+++ b/perllib/FixMyStreet/App/Controller/Questionnaire.pm
@@ -142,8 +142,8 @@ sub submit_creator_fixed : Private {
$questionnaire->ever_reported( $c->stash->{reported} eq 'Yes' ? 1 : 0 );
$questionnaire->old_state( $old_state );
- $questionnaire->whensent( \'ms_current_timestamp()' );
- $questionnaire->whenanswered( \'ms_current_timestamp()' );
+ $questionnaire->whensent( \'current_timestamp' );
+ $questionnaire->whenanswered( \'current_timestamp' );
$questionnaire->insert;
}
@@ -173,13 +173,13 @@ sub submit_standard : Private {
# Record state change, if there was one
if ( $new_state ) {
$problem->state( $new_state );
- $problem->lastupdate( \'ms_current_timestamp()' );
+ $problem->lastupdate( \'current_timestamp' );
}
# If it's not fixed and they say it's still not been fixed, record time update
if ( $c->stash->{been_fixed} eq 'No' &&
FixMyStreet::DB::Result::Problem->open_states->{$old_state} ) {
- $problem->lastupdate( \'ms_current_timestamp()' );
+ $problem->lastupdate( \'current_timestamp' );
}
# Record questionnaire response
@@ -189,7 +189,7 @@ sub submit_standard : Private {
my $q = $c->stash->{questionnaire};
$q->update( {
- whenanswered => \'ms_current_timestamp()',
+ whenanswered => \'current_timestamp',
ever_reported => $reported,
old_state => $old_state,
new_state => $c->stash->{been_fixed} eq 'Unknown' ? 'unknown' : ($new_state || $old_state),
@@ -210,7 +210,7 @@ sub submit_standard : Private {
lang => $c->stash->{lang_code},
cobrand => $c->cobrand->moniker,
cobrand_data => '',
- confirmed => \'ms_current_timestamp()',
+ confirmed => \'current_timestamp',
anonymous => $problem->anonymous,
}
);
@@ -234,6 +234,8 @@ sub process_questionnaire : Private {
map { $c->stash->{$_} = $c->get_param($_) || '' } qw(been_fixed reported another update);
+ $c->stash->{update} = Utils::cleanup_text($c->stash->{update}, { allow_multiline => 1 });
+
# EHA questionnaires done for you
if ($c->cobrand->moniker eq 'emptyhomes') {
$c->stash->{another} = $c->stash->{num_questionnaire}==1 ? 'Yes' : 'No';