only notify for events that are starting soon - ignore long-running events that are in progress

This commit is contained in:
Friendika 2011-10-25 00:32:28 -07:00
parent ae12074337
commit 0b55a7a703

View File

@ -1046,11 +1046,10 @@ function get_events() {
$bd_short = t('F d'); $bd_short = t('F d');
$r = q("SELECT `event`.* FROM `event` $r = q("SELECT `event`.* FROM `event`
WHERE `event`.`uid` = %d AND `type` != 'birthday' AND `start` < '%s' AND `finish` > '%s' WHERE `event`.`uid` = %d AND `type` != 'birthday' AND `start` < '%s'
ORDER BY `start` DESC ", ORDER BY `start` DESC ",
intval(local_user()), intval(local_user()),
dbesc(datetime_convert('UTC','UTC','now + 6 days')), dbesc(datetime_convert('UTC','UTC','now + 6 days'))
dbesc(datetime_convert('UTC','UTC','now'))
); );
if($r && count($r)) { if($r && count($r)) {