]> git.sur5r.net Git - bacula/bacula/blobdiff - gui/bacula-web/bweb.inc.php
bacula-web: New function GetStoredFiles() in bweb.inc.php
[bacula/bacula] / gui / bacula-web / bweb.inc.php
index 95b631ab40113b1bc96217d240155aeb6452220d..8ff3eb90f3d69c2e2f3af7b8691fd7bd62379b8f 100644 (file)
@@ -573,6 +573,21 @@ class Bweb extends DB {
                        }
                }
                
+               public function GetStoredFiles()
+               {
+                       $nbfiles = 0;
+                       $query = "SELECT COUNT(FilenameId) AS nbfiles FROM Filename";
+                       $result = $this->db_link->query( $query );
+                       
+                       if( !PEAR::isError($result) ) {
+                               $nbfiles = $result->fetchRow(DB_FETCHMODE_ASSOC);
+                               $nbfiles = $nbfiles['nbfiles'];
+                       }else{
+                               die("Unable to get protected files from catalog");
+                       }
+                       return $nbfiles;
+               }
+               
                public function GetStoredBytes( $delay = LAST_DAY )
                {
                        $query = "SELECT SUM(JobBytes) as stored_bytes FROM Job ";