]> git.sur5r.net Git - bacula/bacula/blobdiff - gui/bacula-web/jobs.php
bacula-web: Fixed php bugs in Bweb class
[bacula/bacula] / gui / bacula-web / jobs.php
index 721e98a590cc71d55fc3a38884834960863ae6b4..4fb46aa9af9477217b632975285664f5e184cd8b 100644 (file)
                // Elapsed time for the job
                $start = $job['StartTime'];
                $end   = $job['EndTime'];
-
-               if( $start == '0000-00-00 00:00:00' )
-                       $job['elapsed_time'] = 'N/A';
-               elseif( $end == '0000-00-00 00:00:00' )
-                       $job['elapsed_time'] = TimeUtils::Get_Elapsed_Time( strtotime($start), mktime() ); 
-               else
-                       $job['elapsed_time'] = TimeUtils::Get_Elapsed_Time( strtotime($start), strtotime($end) ); 
-
-               // Job Level
-               $job['Level'] = $job_level[ $job['Level'] ];
                
+               // Job execution execution time
+               $job['elapsed_time'] = CTimeUtils::Get_Elapsed_Time( $start, $end);
+               // Job Level
+        $job['Level'] = $job_level[ $job['Level'] ];
                // Job Size
-               $job['JobBytes'] = Utils::Get_Human_Size( $job['JobBytes'] );
+               $job['JobBytes'] = CUtils::Get_Human_Size( $job['JobBytes'] );
 
                array_push( $last_jobs, $job);
          }