diff options
author | friendica <info@friendica.com> | 2013-01-03 02:10:37 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-01-03 02:10:37 -0800 |
commit | e6000f3f6e5832ba0843167e95457451453d9bdc (patch) | |
tree | eaa6a741488cbd4df06d620859b5179392ed93c7 /mod | |
parent | 4aae0ac948ed96f53c96bab9106f653fd3efb011 (diff) | |
download | volse-hubzilla-e6000f3f6e5832ba0843167e95457451453d9bdc.tar.gz volse-hubzilla-e6000f3f6e5832ba0843167e95457451453d9bdc.tar.bz2 volse-hubzilla-e6000f3f6e5832ba0843167e95457451453d9bdc.zip |
fix event query - some DB's have problems with it
Diffstat (limited to 'mod')
-rw-r--r-- | mod/ping.php | 6 |
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'); |