Only show event reminders of events attendyes or attendmaybe
This commit is contained in:
parent
c57f0bcce6
commit
08afec3170
1 changed files with 15 additions and 13 deletions
|
@ -643,27 +643,29 @@ class Profile
|
||||||
$bd_format = L10n::t('g A l F d'); // 8 AM Friday January 18
|
$bd_format = L10n::t('g A l F d'); // 8 AM Friday January 18
|
||||||
$classtoday = '';
|
$classtoday = '';
|
||||||
|
|
||||||
|
$self = dba::selectFirst('contact', ['id'], ['uid' => local_user(), 'self' => true]);
|
||||||
|
|
||||||
$s = dba::p(
|
$s = dba::p(
|
||||||
"SELECT *
|
"SELECT *
|
||||||
FROM `event`
|
FROM `event`
|
||||||
|
JOIN `item`
|
||||||
|
ON `item`.`uid` = `event`.`uid`
|
||||||
|
AND `item`.`parent-uri` = `event`.`uri`
|
||||||
WHERE `event`.`uid` = ?
|
WHERE `event`.`uid` = ?
|
||||||
AND `event`.`type` != 'birthday'
|
AND `event`.`type` != 'birthday'
|
||||||
AND `event`.`start` < ?
|
AND `event`.`start` < ?
|
||||||
AND `event`.`start` >= ?
|
AND `event`.`start` >= ?
|
||||||
AND NOT EXISTS (
|
AND `item`.`author-id` = ?
|
||||||
SELECT `id`
|
AND (`item`.`verb` = ? OR `item`.`verb` = ?)
|
||||||
FROM `item`
|
|
||||||
WHERE `item`.`uid` = `event`.`uid`
|
|
||||||
AND `item`.`parent-uri` = `event`.`uri`
|
|
||||||
AND `item`.`verb` = ?
|
|
||||||
AND `item`.`visible`
|
AND `item`.`visible`
|
||||||
AND NOT `item`.`deleted`
|
AND NOT `item`.`deleted`
|
||||||
)
|
|
||||||
ORDER BY `event`.`start` ASC",
|
ORDER BY `event`.`start` ASC",
|
||||||
local_user(),
|
local_user(),
|
||||||
DateTimeFormat::utc('now + 7 days'),
|
DateTimeFormat::utc('now + 7 days'),
|
||||||
DateTimeFormat::utc('now - 1 days'),
|
DateTimeFormat::utc('now - 1 days'),
|
||||||
ACTIVITY_ATTENDNO
|
$self['id'],
|
||||||
|
ACTIVITY_ATTEND,
|
||||||
|
ACTIVITY_ATTENDMAYBE
|
||||||
);
|
);
|
||||||
|
|
||||||
$r = [];
|
$r = [];
|
||||||
|
|
Loading…
Reference in a new issue