From: Davide Franco Date: Mon, 27 Jun 2011 12:27:59 +0000 (+0200) Subject: bacula-web: Fixed bug with pgsql sql query X-Git-Tag: Release-5.2.1~267 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ad52caee6113a7b1cbf91e8307fdfee4fae3b4c8;p=bacula%2Fbacula bacula-web: Fixed bug with pgsql sql query - Merged SQLite and MySQL query for Backup job list - Fixed list order --- 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 );