From 30fa7510d1654c68daf0b0a5c3c224e11950b0af Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Mon, 27 Jun 2011 14:27:59 +0200 Subject: [PATCH] bacula-web: Fixed bug with pgsql sql query - Merged SQLite and MySQL query for Backup job list - Fixed list order --- gui/bacula-web/includes/bweb.inc.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gui/bacula-web/includes/bweb.inc.php b/gui/bacula-web/includes/bweb.inc.php index 8fd1693538..52b2687585 100644 --- a/gui/bacula-web/includes/bweb.inc.php +++ b/gui/bacula-web/includes/bweb.inc.php @@ -331,7 +331,19 @@ class Bweb extends DB public function Get_BackupJob_Names() { - $query = "SELECT job.name FROM job GROUP BY job.name"; + $query = ''; + + switch( $this->driver ) + { + case 'sqlite': + case 'mysql': + $query = "SELECT name FROM Job GROUP BY name ORDER BY name"; + break; + case 'pgsql': + $query = "SELECT name FROM Job GROUP BY name ORDER BY name"; + break; + } + $backupjobs = array(); $result = $this->db_link->query( $query ); -- 2.39.5