]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Removed useless functions in bweb php classe
authorDavide Franco <bacula-dev@dflc.ch>
Wed, 23 Mar 2011 16:24:43 +0000 (17:24 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:11 +0000 (14:49 +0200)
 - Made also some code cleanup

gui/bacula-web/classes/bweb.inc.php

index f22637835cada016c74d7cde3260f88b69441b88..272ee6a437de994aa7800d2efd321e8a28c6872b 100644 (file)
@@ -121,33 +121,6 @@ class Bweb extends DB {
                $this->db_link->disconnect();
     }      
          
-       function CalculateBytesPeriod($server,$StartDate,$EndPeriod) {   // Bytes transferred in a period.
-
-                       $result =& $this->db_link->query("select SUM(JobBytes) from Job WHERE EndTime < '$EndPeriod' and EndTime > '$StartDate' and Name='$server'")
-                                       or die("classes.inc: Error query: 1");
-                       $return =& $result->fetchRow(); 
-                       return $return[0];
-       }//end function
-
-       
-        
-       function CalculateFilesPeriod($server,$StartDate,$EndPeriod) {    // Number of files transferred in a period.
-
-                       $result =& $this->db_link->query("select SUM(JobFiles) from Job WHERE EndTime < '$EndPeriod' and EndTime > '$StartDate' and Name='$server'")
-                                       or die("classes.inc: Error query: 2");
-                       $return =& $result->fetchRow();
-                       return $return[0];
-       }//end function 
-
-                        
-
-       function PrepareDate($StartDateMonth,$StartDateDay,$StartDateYear,$EndDateMonth,$EndDateDay,$EndDateYear) {  // Convert date for Smarty. Check if only works with Mysql.
-       
-                       $this->StartDate=$StartDateYear."-".$StartDateMonth."-".$StartDateDay." 00:00:00";
-                       $this->EndDate=$EndDateYear."-".$EndDateMonth."-".$EndDateDay." 23:59:59";  // last day full
-                       
-       }//end function
-       
        // Return humanized size with default unit of GB
        // if auto provide for unit argument, automaticaly decide which unit
        function human_file_size( $size, $decimal = 2, $unit = 'auto' )
@@ -165,10 +138,9 @@ class Bweb extends DB {
                                                $hsize    = $hsize / 1024;
                                                $unit_id += 1;
                                        }        
-                                       else {
+                                       else
                                                $lisible = true;
-                                       } 
-                               }
+                               } // end while
                        break;
                        
                        default:
@@ -225,7 +197,7 @@ class Bweb extends DB {
                else
                        return $clients->fetchRow( DB_FETCHMODE_ASSOC );
        }
-
+  
        // Return an array of volumes ordered by poolid and volume name
        function GetVolumeList() {