mirror of
				https://bitbucket.org/jsuto/piler.git
				synced 2025-11-04 12:42:27 +01:00 
			
		
		
		
	Fixed total days counter to show valid projection on the first day too
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
		@@ -2,7 +2,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ControllerHealthWorker extends Controller {
 | 
					class ControllerHealthWorker extends Controller {
 | 
				
			||||||
   private $error = array();
 | 
					   private $error = [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   public function index(){
 | 
					   public function index(){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -72,6 +72,10 @@ class ControllerHealthWorker extends Controller {
 | 
				
			|||||||
      $oldest_record_timestamp = $this->model_health_health->get_oldest_record_ts();
 | 
					      $oldest_record_timestamp = $this->model_health_health->get_oldest_record_ts();
 | 
				
			||||||
      $total_number_days = round( (time() - $this->model_health_health->get_first_email_arrival_ts()) / 86400 );
 | 
					      $total_number_days = round( (time() - $this->model_health_health->get_first_email_arrival_ts()) / 86400 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      if($total_number_days == 0) {
 | 
				
			||||||
 | 
					         $total_number_days = 1;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      $this->data['archive_size'] = nice_size($archivesizeraw, ' ');
 | 
					      $this->data['archive_size'] = nice_size($archivesizeraw, ' ');
 | 
				
			||||||
      $this->data['archive_stored_size'] = nice_size($archivestoredsizeraw, ' ');
 | 
					      $this->data['archive_stored_size'] = nice_size($archivestoredsizeraw, ' ');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user