aboutsummaryrefslogtreecommitdiffstats
path: root/mod/ping.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/ping.php')
-rw-r--r--mod/ping.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/mod/ping.php b/mod/ping.php
index eb7c9b946..2d52e9731 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -18,6 +18,8 @@ function ping_init(&$a) {
$result['events_today'] = 0;
$result['birthdays'] = 0;
$result['birthdays_today'] = 0;
+ $result['all_events'] = 0;
+ $result['all_events_today'] = 0;
$result['notice'] = array();
$result['info'] = array();
@@ -166,9 +168,9 @@ function ping_init(&$a) {
);
if($events && count($events)) {
- $result['events'] = intval($events[0]['total']);
+ $result['all_events'] = intval($events[0]['total']);
- if($result['events']) {
+ if($result['all_events']) {
$str_now = datetime_convert('UTC',$a->timezone,'now','Y-m-d');
foreach($events as $x) {
$bd = false;
@@ -176,10 +178,15 @@ function ping_init(&$a) {
$result['birthdays'] ++;
$bd = true;
}
+ else {
+ $result['events'] ++;
+ }
if(datetime_convert('UTC',((intval($x['adjust'])) ? $a->timezone : 'UTC'), $x['start'],'Y-m-d') === $str_now) {
- $result['events_today'] ++;
+ $result['all_events_today'] ++;
if($bd)
$result['birthdays_today'] ++;
+ else
+ $result['events_today'] ++;
}
}
}