diff options
author | Struan Donald <struan@exo.org.uk> | 2011-06-07 18:01:18 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-06-07 18:01:18 +0100 |
commit | db5da038ea3a3264b4bae2490dbd877cba2ecab0 (patch) | |
tree | 561f6d2ea01ba93f968d5124a2f95714376fb194 /perllib/FixMyStreet/DB | |
parent | 673a2879a74d0d71c4d3be0b9c7ee567cf72b219 (diff) | |
parent | f128b19cf7bf0da5dd445dc39d1a09e8953fc32d (diff) |
Merge branch 'migrate_to_catalyst' of ssh://git.mysociety.org/data/git/public/fixmystreet into migrate_to_catalyst
Diffstat (limited to 'perllib/FixMyStreet/DB')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Comment.pm | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 6 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm index 40801306b..68175dead 100644 --- a/perllib/FixMyStreet/DB/Result/Comment.pm +++ b/perllib/FixMyStreet/DB/Result/Comment.pm @@ -72,6 +72,7 @@ __PACKAGE__->belongs_to( # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:71bSUgPf3uW607g2EGl/Vw use DateTime::TimeZone; +use Image::Size; use Moose; use namespace::clean -except => [ 'meta' ]; diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index c3b387710..f496fb062 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -104,8 +104,10 @@ __PACKAGE__->has_many( # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:U3aYCRwE4etekKaHdhEkIw use DateTime::TimeZone; +use Image::Size; use Moose; use namespace::clean -except => [ 'meta' ]; +use Utils; with 'FixMyStreet::Roles::Abuser'; @@ -278,7 +280,7 @@ sub meta_line { my ( $problem, $c ) = @_; my $date_time = - Page::prettify_epoch( $problem->confirmed_local->epoch ); + Utils::prettify_epoch( $problem->confirmed_local->epoch ); my $meta = ''; # FIXME Should be in cobrand @@ -359,7 +361,7 @@ sub duration_string { $body = join(' and ', map { $areas_info->{$_}->{name} } @councils); } return sprintf(_('Sent to %s %s later'), $body, - Page::prettify_duration($problem->whensent_local->epoch - $problem->confirmed_local->epoch, 'minute') + Utils::prettify_duration($problem->whensent_local->epoch - $problem->confirmed_local->epoch, 'minute') ); } diff --git a/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm b/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm index ab3acc388..ee15f8308 100644 --- a/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm +++ b/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm @@ -4,7 +4,7 @@ use base 'DBIx::Class::ResultSet'; use strict; use warnings; use File::Slurp; -use Page; +use Utils; use mySociety::EmailUtil; sub send_questionnaires { @@ -63,7 +63,7 @@ sub send_questionnaires_period { } my %h = map { $_ => $row->$_ } qw/name title detail category/; - $h{created} = Page::prettify_duration( time() - $row->confirmed->epoch, 'week' ); + $h{created} = Utils::prettify_duration( time() - $row->confirmed->epoch, 'week' ); my $questionnaire = FixMyStreet::App->model('DB::Questionnaire')->create( { problem_id => $row->id, |