fixed division by zero statistics bug, system_cron sql data
This commit is contained in:
parent
5449139080
commit
bde461ba8c
1
dbd/sql/mysql/data/system_cron.sql
Normal file
1
dbd/sql/mysql/data/system_cron.sql
Normal file
@ -0,0 +1 @@
|
||||
INSERT INTO `system_cron` (`class`, `min`, `hour`, `day`, `day_week`, `month`, `last_run`, `status`) VALUES ('\\SYSTEM\\CRON\\cron_log2sqlite', 0, 0, 0, 0, 0, '2015-01-01 01:00:00', 0);
|
||||
@ -6,5 +6,7 @@ class todo_stats_gen extends todo_stats {
|
||||
$res = array();
|
||||
$res[0] = \SYSTEM\DBD\SYS_SAIMOD_TODO_STATS_COUNT_TODO_GEN::Q1();
|
||||
$res[2] = \SYSTEM\DBD\SYS_SAIMOD_TODO_STATS_COUNT_DOTO_GEN::Q1();
|
||||
return new \SYSTEM\SAI\todo_stats_data('Generated ToDos',floatval($res[2]['count']),floatval($res[0]['count']+$res[2]['count']));}
|
||||
$count = floatval($res[2]['count']);
|
||||
$all = floatval($res[0]['count']+$res[2]['count']);
|
||||
return $all == 0 ? new \SYSTEM\SAI\todo_stats_data('Generated ToDos',1,1) : new \SYSTEM\SAI\todo_stats_data('Generated ToDos',$count,$all);}
|
||||
}
|
||||
|
||||
@ -6,5 +6,7 @@ class todo_stats_user extends todo_stats {
|
||||
$res = array();
|
||||
$res[0] = \SYSTEM\DBD\SYS_SAIMOD_TODO_STATS_COUNT_TODO_USER::Q1();
|
||||
$res[2] = \SYSTEM\DBD\SYS_SAIMOD_TODO_STATS_COUNT_DOTO_USER::Q1();
|
||||
return new \SYSTEM\SAI\todo_stats_data('User ToDos',floatval($res[2]['count']),floatval($res[0]['count']+$res[2]['count']));}
|
||||
$count = floatval($res[2]['count']);
|
||||
$all = floatval($res[0]['count']+$res[2]['count']);
|
||||
return $all == 0 ? new \SYSTEM\SAI\todo_stats_data('User ToDos',1,1) : new \SYSTEM\SAI\todo_stats_data('User ToDos',$count,$all);}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user