From: Davide Franco Date: Thu, 2 Dec 2010 09:11:59 +0000 (+0100) Subject: bacula-web: Removed useless GetDataVolumes() in bweb.inc.php X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=19e93cb226971929111efeeec857d44b6943e45f;p=bacula%2Fbacula bacula-web: Removed useless GetDataVolumes() in bweb.inc.php --- 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;