From 7f446ae898dc9f9fe8d97fdd01f0e39ba7676867 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 20 Jun 2006 14:55:39 +0000 Subject: Bug 313531: Move 'use Bugzilla;' out of globals.pl - Patch by Frédéric Buclin r=mkanat a=myk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/Chart.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Bugzilla/Chart.pm') diff --git a/Bugzilla/Chart.pm b/Bugzilla/Chart.pm index a0853d508..c878186bc 100644 --- a/Bugzilla/Chart.pm +++ b/Bugzilla/Chart.pm @@ -36,6 +36,7 @@ use Bugzilla::Util; use Bugzilla::Series; use Date::Format; +use Date::Parse; sub new { my $invocant = shift; @@ -99,7 +100,7 @@ sub init { # Make sure the dates are ones we are able to interpret foreach my $date ('datefrom', 'dateto') { if ($self->{$date}) { - $self->{$date} = &::str2time($self->{$date}) + $self->{$date} = str2time($self->{$date}) || &::ThrowUserError("illegal_date", { date => $self->{$date}}); } } @@ -223,7 +224,7 @@ sub readData { my $datefrom = $dbh->selectrow_array("SELECT MIN(series_date) " . "FROM series_data " . "WHERE series_id IN ($series_ids)"); - $datefrom = &::str2time($datefrom); + $datefrom = str2time($datefrom); if ($self->{'datefrom'} && $self->{'datefrom'} > $datefrom) { $datefrom = $self->{'datefrom'}; @@ -232,7 +233,7 @@ sub readData { my $dateto = $dbh->selectrow_array("SELECT MAX(series_date) " . "FROM series_data " . "WHERE series_id IN ($series_ids)"); - $dateto = &::str2time($dateto); + $dateto = str2time($dateto); if ($self->{'dateto'} && $self->{'dateto'} < $dateto) { $dateto = $self->{'dateto'}; @@ -420,7 +421,7 @@ sub generateDateProgression { $dateto += (2 * $oneday) / 3; while ($datefrom < $dateto) { - push (@progression, &::time2str("%Y-%m-%d", $datefrom)); + push (@progression, time2str("%Y-%m-%d", $datefrom)); $datefrom += $oneday; } -- cgit v1.2.3-24-g4f1b