Merge pull request #4515 from MrPetovan/task/4513-hide-attendno-events
Add attendance check to event reminder
This commit is contained in:
commit
617ace38e4
|
@ -439,7 +439,7 @@ function networkFlatView(App $a, $update = 0)
|
|||
|
||||
if (!Config::get('theme', 'hide_eventlist')) {
|
||||
$o .= Profile::getBirthdays();
|
||||
$o .= Profile::getEvents();
|
||||
$o .= Profile::getEventsReminderHTML();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -677,7 +677,7 @@ function networkThreadedView(App $a, $update, $parent)
|
|||
|
||||
if (!$gid && !$cid && !$update && !Config::get('theme', 'hide_eventlist')) {
|
||||
$o .= Profile::getBirthdays();
|
||||
$o .= Profile::getEvents();
|
||||
$o .= Profile::getEventsReminderHTML();
|
||||
}
|
||||
|
||||
if ($datequery) {
|
||||
|
|
|
@ -352,7 +352,7 @@ function profile_content(App $a, $update = 0)
|
|||
|
||||
if ($is_owner && !$update && !Config::get('theme', 'hide_eventlist')) {
|
||||
$o .= Profile::getBirthdays();
|
||||
$o .= Profile::getEvents();
|
||||
$o .= Profile::getEventsReminderHTML();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -622,7 +622,7 @@ class Profile
|
|||
]);
|
||||
}
|
||||
|
||||
public static function getEvents()
|
||||
public static function getEventsReminderHTML()
|
||||
{
|
||||
$a = get_app();
|
||||
$o = '';
|
||||
|
@ -642,12 +642,26 @@ class Profile
|
|||
$classtoday = '';
|
||||
|
||||
$s = dba::p(
|
||||
"SELECT `event`.* FROM `event`
|
||||
WHERE `event`.`uid` = ? AND `type` != 'birthday' AND `start` < ? AND `start` >= ?
|
||||
ORDER BY `start` ASC ",
|
||||
"SELECT *
|
||||
FROM `event`
|
||||
WHERE `event`.`uid` = ?
|
||||
AND `event`.`type` != 'birthday'
|
||||
AND `event`.`start` < ?
|
||||
AND `event`.`start` >= ?
|
||||
AND NOT EXISTS (
|
||||
SELECT `id`
|
||||
FROM `item`
|
||||
WHERE `item`.`uid` = `event`.`uid`
|
||||
AND `item`.`parent-uri` = `event`.`uri`
|
||||
AND `item`.`verb` = ?
|
||||
AND `item`.`visible`
|
||||
AND NOT `item`.`deleted`
|
||||
)
|
||||
ORDER BY `event`.`start` ASC",
|
||||
local_user(),
|
||||
DateTimeFormat::utc('now + 7 days'),
|
||||
DateTimeFormat::utc('now - 1 days')
|
||||
DateTimeFormat::utc('now - 1 days'),
|
||||
ACTIVITY_ATTENDNO
|
||||
);
|
||||
|
||||
$r = [];
|
||||
|
|
Loading…
Reference in New Issue
Block a user