From: Davide Franco Date: Sun, 26 Jun 2011 17:33:28 +0000 (+0200) Subject: bacula-web: Fixed case on bacula table fields name X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b2c997efa06e92c35527d895d87cda2cfde0728d;p=bacula%2Fbacula bacula-web: Fixed case on bacula table fields name --- diff --git a/gui/bacula-web/includes/bweb.inc.php b/gui/bacula-web/includes/bweb.inc.php index efdbbf1fc8..8fd1693538 100644 --- a/gui/bacula-web/includes/bweb.inc.php +++ b/gui/bacula-web/includes/bweb.inc.php @@ -331,16 +331,16 @@ class Bweb extends DB public function Get_BackupJob_Names() { - $query = "SELECT Name FROM Job GROUP BY Name"; + $query = "SELECT job.name FROM job GROUP BY job.name"; $backupjobs = array(); $result = $this->db_link->query( $query ); if (PEAR::isError( $result ) ) { - die("Unable to get BackupJobs list from catalog" ); + $this->TriggerDBError("Unable to get BackupJobs list from catalog", $result ); }else{ - while( $backupjob = $result->fetchRow( DB_FETCHMODE_ASSOC ) ) { - array_push( $backupjobs, $backupjob["Name"] ); + while( $backupjob = $result->fetchRow() ) { + array_push( $backupjobs, $backupjob["name"] ); } return $backupjobs; } diff --git a/gui/bacula-web/jobs.php b/gui/bacula-web/jobs.php index 4fb46aa9af..b3741aa10d 100644 --- a/gui/bacula-web/jobs.php +++ b/gui/bacula-web/jobs.php @@ -80,7 +80,7 @@ while( $job = $jobsresult->fetchRow( DB_FETCHMODE_ASSOC ) ) { // Determine icon for job status - switch( $job['JobStatus'] ) { + switch( $job['jobstatus'] ) { case J_RUNNING: $job['Job_icon'] = "running.png"; break; @@ -115,15 +115,15 @@ $job['Job_classe'] = 'odd'; // Elapsed time for the job - $start = $job['StartTime']; - $end = $job['EndTime']; + $start = $job['starttime']; + $end = $job['endtime']; // Job execution execution time $job['elapsed_time'] = CTimeUtils::Get_Elapsed_Time( $start, $end); // Job Level - $job['Level'] = $job_level[ $job['Level'] ]; + $job['Level'] = $job_level[ $job['level'] ]; // Job Size - $job['JobBytes'] = CUtils::Get_Human_Size( $job['JobBytes'] ); + $job['JobBytes'] = CUtils::Get_Human_Size( $job['jobbytes'] ); array_push( $last_jobs, $job); } diff --git a/gui/bacula-web/templates/jobs.tpl b/gui/bacula-web/templates/jobs.tpl index 7a142bf228..c9827cdade 100644 --- a/gui/bacula-web/templates/jobs.tpl +++ b/gui/bacula-web/templates/jobs.tpl @@ -69,17 +69,17 @@ - {$job.JobId} + {$job.jobid} - {$job.Job_name} + {$job.job_name} - {$job.StartTime} - {$job.EndTime} + {$job.starttime} + {$job.endtime} {$job.elapsed_time} - {$job.Level} - {$job.JobBytes} - {$job.JobFiles} - {$job.Pool_name} + {$job.level} + {$job.jobbytes} + {$job.jobfiles} + {$job.pool_name} {/foreach}