aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/ping.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/mod/ping.php b/mod/ping.php
index b135ac6e3..6b76c33ca 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -210,7 +210,7 @@ function ping_init(&$a) {
$t5 = dba_timer();
- $events = q("SELECT count(`event`.`id`) as total, type, start, adjust FROM `event`
+ $events = q("SELECT type, start, adjust FROM `event`
WHERE `event`.`uid` = %d AND `start` < '%s' AND `finish` > '%s' and `ignore` = 0
ORDER BY `start` ASC ",
intval(local_user()),
@@ -218,8 +218,8 @@ function ping_init(&$a) {
dbesc(datetime_convert('UTC','UTC','now'))
);
- if($events && count($events)) {
- $result['all_events'] = intval($events[0]['total']);
+ if($events) {
+ $result['all_events'] = count($events);
if($result['all_events']) {
$str_now = datetime_convert('UTC',$a->timezone,'now','Y-m-d');