mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:55:19 +00:00
fix events ping notification backend
This commit is contained in:
parent
f261871346
commit
9899cfb5c7
1 changed files with 2 additions and 2 deletions
|
@ -155,7 +155,7 @@ function ping_init(&$a) {
|
|||
|
||||
$t5 = dba_timer();
|
||||
|
||||
$events = q("SELECT count(`event`.`id`) as total, start, convert FROM `event`
|
||||
$events = q("SELECT count(`event`.`id`) as total, start, adjust FROM `event`
|
||||
WHERE `event`.`uid` = %d AND `start` < '%s' AND `finish` > '%s'
|
||||
ORDER BY `start` ASC ",
|
||||
intval(local_user()),
|
||||
|
@ -169,7 +169,7 @@ function ping_init(&$a) {
|
|||
if($result['events']) {
|
||||
$str_now = datetime_convert('UTC',$a->timezone,'now','Y-m-d');
|
||||
foreach($events as $x) {
|
||||
if(datetime_convert('UTC',((intval($x['convert'])) ? $a->timezone : 'UTC'), $x['start'],'Y-m-d') === $str_now)
|
||||
if(datetime_convert('UTC',((intval($x['adjust'])) ? $a->timezone : 'UTC'), $x['start'],'Y-m-d') === $str_now)
|
||||
$result['events_today'] ++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue