mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-01-12 12:10:12 +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:
parent
679e71ff4f
commit
c34e3ca641
@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
class ControllerHealthWorker extends Controller {
|
||||
private $error = array();
|
||||
private $error = [];
|
||||
|
||||
public function index(){
|
||||
|
||||
@ -72,6 +72,10 @@ class ControllerHealthWorker extends Controller {
|
||||
$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 );
|
||||
|
||||
if($total_number_days == 0) {
|
||||
$total_number_days = 1;
|
||||
}
|
||||
|
||||
$this->data['archive_size'] = nice_size($archivesizeraw, ' ');
|
||||
$this->data['archive_stored_size'] = nice_size($archivestoredsizeraw, ' ');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user