diff options
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Alert.pm | 4 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Contact.pm | 11 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Comment.pm | 8 |
4 files changed, 11 insertions, 14 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Alert.pm b/perllib/FixMyStreet/App/Controller/Alert.pm index aa51f1ba3..7ea0d77e3 100644 --- a/perllib/FixMyStreet/App/Controller/Alert.pm +++ b/perllib/FixMyStreet/App/Controller/Alert.pm @@ -132,10 +132,6 @@ sub subscribe_email : Private { if ( $type eq 'updates' ) { $c->forward('set_update_alert_options'); } - elsif ( $type eq 'problems' ) { - -# $alert_id = FixMyStreet::Alert::create($email, 'new_problems', $cobrand, $cobrand_data); - } elsif ( $type eq 'local' ) { $c->forward('set_local_alert_options'); } diff --git a/perllib/FixMyStreet/App/Controller/Contact.pm b/perllib/FixMyStreet/App/Controller/Contact.pm index 0e6e60944..558a354c6 100644 --- a/perllib/FixMyStreet/App/Controller/Contact.pm +++ b/perllib/FixMyStreet/App/Controller/Contact.pm @@ -76,14 +76,11 @@ sub determine_contact_type : Private { ); if ($update_id) { + my $update = $c->model('DB::Comment')->find( + { id => $update_id } + ); - # FIXME: updates not implemented yet - -# my $u = dbh()->selectrow_hashref( -# 'select comment.text, comment.name, problem.title, extract(epoch from comment.confirmed) as confirmed -# from comment, problem where comment.id=? -# and comment.problem_id = problem.id -# and comment.problem_id=?', {}, $update_id ,$id); + $c->stash->{update} = $update; } elsif ($problem) { $c->stash->{problem} = $problem; diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm index b6f336ffa..a36a13399 100644 --- a/perllib/FixMyStreet/App/Controller/Report.pm +++ b/perllib/FixMyStreet/App/Controller/Report.pm @@ -109,8 +109,6 @@ sub format_problem_for_display : Private { $c->stash->{banner} = $c->cobrand->generate_problem_banner($problem); - $c->stash->{allow_photo_upload} = $c->cobrand->allow_photo_display; # FIXME? - $c->stash->{cobrand_alert_fields} = $c->cobrand->form_elements('/alerts'); $c->stash->{cobrand_update_fields} = $c->cobrand->form_elements('/updateForm'); diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm index 66216aa6e..9b5feb37d 100644 --- a/perllib/FixMyStreet/DB/Result/Comment.pm +++ b/perllib/FixMyStreet/DB/Result/Comment.pm @@ -79,7 +79,13 @@ sub created_local { } sub confirmed_local { - return shift->confirmed->set_time_zone($tz); + my $self = shift; + + # if confirmed is null then it doesn't get inflated so don't + # try and set the timezone + return $self->confirmed->set_time_zone($tz) if $self->confirmed; + + return 0; } # You can replace this text with custom code or comments, and it will be preserved on regeneration |