mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 20:30:11 +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 {
|
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, ' ');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user