From: Davide Franco Date: Mon, 27 Jun 2011 12:27:59 +0000 (+0200) Subject: bacula-web: Fixed bug with pgsql sql query X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=30fa7510d1654c68daf0b0a5c3c224e11950b0af;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 );