From f0e14052dda1461e03942713e4349832f8911130 Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Tue, 21 Jun 2011 13:28:57 +0200 Subject: [PATCH] bacula-web: Modified usage of Get_ElapsedTime() function to TimeUtils::Get_Elapsed_Time() --- gui/bacula-web/jobs.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/gui/bacula-web/jobs.php b/gui/bacula-web/jobs.php index 9a6d7d6a2b..721e98a590 100644 --- a/gui/bacula-web/jobs.php +++ b/gui/bacula-web/jobs.php @@ -115,15 +115,18 @@ $job['Job_classe'] = 'odd'; // Elapsed time for the job - if( $job['StartTime'] == '0000-00-00 00:00:00' ) + $start = $job['StartTime']; + $end = $job['EndTime']; + + if( $start == '0000-00-00 00:00:00' ) $job['elapsed_time'] = 'N/A'; - elseif( $job['EndTime'] == '0000-00-00 00:00:00' ) - $job['elapsed_time'] = $dbSql->Get_ElapsedTime( strtotime($job['StartTime']), mktime() ); + elseif( $end == '0000-00-00 00:00:00' ) + $job['elapsed_time'] = TimeUtils::Get_Elapsed_Time( strtotime($start), mktime() ); else - $job['elapsed_time'] = $dbSql->Get_ElapsedTime( strtotime($job['StartTime']), strtotime($job['EndTime']) ); + $job['elapsed_time'] = TimeUtils::Get_Elapsed_Time( strtotime($start), strtotime($end) ); // Job Level - $job['Level'] = $job_level[ $job['Level'] ]; + $job['Level'] = $job_level[ $job['Level'] ]; // Job Size $job['JobBytes'] = Utils::Get_Human_Size( $job['JobBytes'] ); -- 2.39.5