]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Modified usage of Get_ElapsedTime() function to TimeUtils::Get_Elapsed_Time()
authorDavide Franco <bacula-dev@dflc.ch>
Tue, 21 Jun 2011 11:28:57 +0000 (13:28 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:13 +0000 (14:49 +0200)
gui/bacula-web/jobs.php

index 9a6d7d6a2bf3d46ef484d9674caf25cfd68dd81e..721e98a590cc71d55fc3a38884834960863ae6b4 100644 (file)
                        $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'] );