]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Removed useless GetStoredBytesByInterval() function
authorDavide Franco <bacula-dev@dflc.ch>
Fri, 8 Jul 2011 16:44:52 +0000 (18:44 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:21 +0000 (14:49 +0200)
gui/bacula-web/includes/bweb.inc.php

index 0e94f135286a097f2a6370052b9222f504852f4d..a847878117364676217f0c726a769a7e50232020 100644 (file)
@@ -498,40 +498,6 @@ class Bweb extends DB
                return $totalfiles;
        }
        
-       public function GetStoredBytesByInterval( $start_date, $end_date )
-       {
-               $query = '';
-               
-               switch($this->driver) {
-                       case 'sqlite':
-                       case 'mysql':
-                               $query = "SELECT SUM(JobBytes) as stored_bytes FROM Job WHERE (EndTime BETWEEN '$start_date' AND '$end_date')";
-                       break;
-                       case 'pgsql':
-                               $query = "SELECT SUM(JobBytes) as stored_bytes FROM Job WHERE (EndTime BETWEEN '$start_date' AND '$end_date')";
-                       break;
-               }
-               
-               $result = $this->db_link->query( $query );
-               
-               if( PEAR::isError( $result ) ) {
-                       $this->TriggerDBError( "Unable to get Job Bytes from catalog", $result );
-               }else{
-                       $stored_bytes = 0;
-                       $tmp = $result->fetchRow();
-                       
-                       $day = date( "D d", strtotime($end_date) );
-                       
-                       if( isset( $tmp['stored_bytes'] ) ) {
-                               $hbytes = CUtils::Get_Human_Size( $tmp['stored_bytes'], 3, 'GB' );
-                               $hbytes = explode( " ", $hbytes );
-                               $stored_bytes = $hbytes[0];
-                       }
-                       
-                       return array( $day, $stored_bytes );
-               }
-       }
-       
        public function GetStoredBytesByJob( $jobname, $start_date, $end_date )
        {
                $query = '';