]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: New parameter client for getStoredFiles() function in bweb class
authorDavide Franco <bacula-dev@dflc.ch>
Sun, 24 Jul 2011 10:22:04 +0000 (12:22 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:27 +0000 (14:49 +0200)
gui/bacula-web/includes/bweb.inc.php

index cacd6c94219a59fffa393dca7a1f360e7c78f97e..8f31664dd51ff962610f902170025ec72aa8c271 100644 (file)
@@ -484,7 +484,7 @@ class Bweb
        //              $end_timestamp:         end date in unix timestamp format
        //              $job_name:                      optional job name
        
-       public function getStoredBytes( $start_timestamp, $end_timestamp, $job_name = 'ALL' )
+       public function getStoredBytes( $start_timestamp, $end_timestamp, $job_name = 'ALL', $client = 'ALL' )
        {
                $query                  = '';
                $result                 = '';
@@ -507,6 +507,9 @@ class Bweb
                if( $job_name != 'ALL' ) 
                        $query .= " AND name = '$job_name'";
                
+               if( $client != 'ALL' )
+                       $query .= " AND clientid = '$client'";          
+               
                // Execute SQL statment
                try {
                        $result = $this->db_link->runQuery( $query );