From 19e93cb226971929111efeeec857d44b6943e45f Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Thu, 2 Dec 2010 10:11:59 +0100 Subject: [PATCH] bacula-web: Removed useless GetDataVolumes() in bweb.inc.php --- gui/bacula-web/bweb.inc.php | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/gui/bacula-web/bweb.inc.php b/gui/bacula-web/bweb.inc.php index c697583ead..60f9be11a4 100644 --- a/gui/bacula-web/bweb.inc.php +++ b/gui/bacula-web/bweb.inc.php @@ -181,29 +181,6 @@ class Bweb extends DB { }//end function - function GetDataVolumes() { - - $volume = array(); - $res = $this->db_link->query("SELECT Name FROM Pool"); - while ( $tmp =& $res->fetchRow() ) { - if ($this->driver == "mysql" ) - $result = $this->db_link->query("select Media.VolumeName, Media.VolBytes,Media.VolStatus,Pool.Name,Media.MediaType,Media.LastWritten,FROM_UNIXTIME(UNIX_TIMESTAMP(Media.LastWritten)+Media.VolRetention ) as expire from Pool LEFT JOIN Media ON Media.PoolId=Pool.PoolId where Name='$tmp[0]' order by Media.VolumeName"); - else if ($this->driver == "pgsql") - $result = $this->db_link->db_query("select Media.VolumeName, Media.VolBytes,Media.VolStatus,Pool.Name,Media.MediaType,Media.LastWritten, Media.LastWritten + Media.VolRetention * interval '1 second' as expire from Pool LEFT JOIN Media ON Media.PoolId=Pool.PoolId where Name='$tmp[0]' order by Media.VolumeName"); - while ( $tmp1 = $result->fetchRow() ) { - $pos = array_key_exists($tmp[0],$volume); - if ($pos != FALSE) - array_push($volume["$tmp[0]"],$tmp1); - else - $volume += array($tmp[0]=>array($tmp1)); - } - } - - $res->free(); - $result->free(); - return $volume; - } - function human_file_size( $size, $decimal = 2 ) { $unit_id = 0; -- 2.39.5