]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Removed useless function GetStoredBytesByJob() in bweb class
authorDavide Franco <bacula-dev@dflc.ch>
Fri, 8 Jul 2011 18:16:38 +0000 (20:16 +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 6b1d6bbedad43b50fcfc4a8b4168e111dd2d5888..7b716de871e1c4d7c896c152bbb37109616a43c1 100644 (file)
@@ -407,47 +407,6 @@ class Bweb extends DB
                return $totalfiles;
        }
        
-       public function GetStoredBytesByJob( $jobname, $start_date, $end_date )
-       {
-               $query = '';
-               
-               switch( $this->driver )
-               {
-                       case 'sqlite':
-                       case 'mysql':
-                               $query  = "SELECT SUM(JobBytes),EndTime as stored_bytes FROM Job ";
-                               $query .= "WHERE ( EndTime BETWEEN '$start_date' AND '$end_date' ) AND ";
-                               $query .= "Name = '$jobname'";
-                               $query .= "GROUP BY EndTime";
-                               break;
-                       case 'pgsql':
-                               $query  = "SELECT SUM(jobbytes),endtime as stored_bytes FROM job ";
-                               $query .= "WHERE ( endtime BETWEEN timestamp '$start_date' AND timestamp '$end_date' ) AND ";
-                               $query .= "name = '$jobname'";
-                               $query .= "GROUP BY EndTime";
-                               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 );
-               }                       
-       }
-       
        // Function: getStoredBytes
        // Parameters:
        //              $start_timestamp:       start date in unix timestamp format