diff options
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/App/View/Web.pm | 5 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 5 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm | 4 | ||||
-rw-r--r-- | perllib/FixMyStreet/Geocode.pm | 1 |
4 files changed, 8 insertions, 7 deletions
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm index b5f6e341d..5b20e286b 100644 --- a/perllib/FixMyStreet/App/View/Web.pm +++ b/perllib/FixMyStreet/App/View/Web.pm @@ -8,6 +8,7 @@ use mySociety::Locale; use mySociety::Web qw(ent); use FixMyStreet; use CrossSell; +use Utils; __PACKAGE__->config( TEMPLATE_EXTENSION => '.html', @@ -91,7 +92,7 @@ sub display_crosssell_advert { return CrossSell::display_advert( $q, $email, $name, %data ); } -=head2 Page::prettify_epoch +=head2 Utils::prettify_epoch [% pretty = prettify_epoch( $epoch, $short_bool ) %] @@ -104,7 +105,7 @@ Return a pretty version of the epoch. sub prettify_epoch { my ( $self, $c, $epoch, $short_bool ) = @_; - return Page::prettify_epoch( $epoch, $short_bool ); + return Utils::prettify_epoch( $epoch, $short_bool ); } =head2 add_links diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index c3475e31c..f496fb062 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -107,6 +107,7 @@ use DateTime::TimeZone; use Image::Size; use Moose; use namespace::clean -except => [ 'meta' ]; +use Utils; with 'FixMyStreet::Roles::Abuser'; @@ -279,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 @@ -360,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 1f5e26197..f197cfc95 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, diff --git a/perllib/FixMyStreet/Geocode.pm b/perllib/FixMyStreet/Geocode.pm index 9419a91f7..50a7ba339 100644 --- a/perllib/FixMyStreet/Geocode.pm +++ b/perllib/FixMyStreet/Geocode.pm @@ -18,7 +18,6 @@ use Digest::MD5 qw(md5_hex); use URI::Escape; use Cobrand; -use Page; use Utils; use mySociety::Config; use mySociety::Locale; |