// Calculate total bytes for this period
   $backupjob_bytes = $dbSql->getStoredBytes( LAST_WEEK, NOW, $backupjob_name );
   $backupjob_bytes = CUtils::Get_Human_Size( $backupjob_bytes );
-       
+  
+  $backupjob_files = $dbSql->getStoredFiles( LAST_WEEK, NOW, $backupjob_name );
+  
   // Get the last 7 days interval (start and end)\r
   for( $c = 6 ; $c >= 0 ; $c-- ) {\r
          $today  = NOW - ($c * DAY);
   // ===============================================================
   $graph = new CGraph("graph3.png" );
   \r
-  foreach( $days as $day )\r
-    array_push( $days_stored_files, $dbSql->GetStoredFilesByJob( $backupjob_name, $day['start'], $day['end'] ) );\r
+  foreach( $days as $day ) {
+       $stored_files            = $dbSql->getStoredFiles( $day['start'], $day['end'], $backupjob_name);
+       $days_stored_files[] = array( date("m-d", $day['start']), $stored_files );
+  }
 \r
-  // Calculate total files for this period     \r
-  foreach( $days_stored_files as $day )\r
-       $backupjob_files += $day[1];\r
-  \r
   $graph->SetData( $days_stored_files, 'bars', 'text-data' );\r
   $graph->SetGraphSize( 400, 230 );\r
   $graph->SetYTitle( "Files" );