public function assignVariables() {
parent::assignVariables();
- $lastEventTime = $this->eventList->getLastEventTime();
-
// removes orphaned and non-accessible events
UserActivityEventHandler::validateEvents($this->eventList);
// remove unused items
$this->eventList->truncate(20);
-
+
WCF::getTPL()->assign([
'eventList' => $this->eventList,
- 'lastEventTime' => $lastEventTime,
+ 'lastEventTime' => $this->eventList->getLastEventTime(),
'allowSpidersToIndexThisPage' => true
]);
}
$eventList->getConditionBuilder()->add("user_activity_event.userID = ?", [$userID]);
$eventList->readObjects();
- $lastEventTime = $eventList->getLastEventTime();
- if ($lastEventTime) {
- UserActivityEventHandler::validateEvents($eventList);
- }
+ UserActivityEventHandler::validateEvents($eventList);
// remove unused items
$eventList->truncate(20);
WCF::getTPL()->assign([
'eventList' => $eventList,
- 'lastEventTime' => $lastEventTime,
+ 'lastEventTime' => $eventList->getLastEventTime(),
'placeholder' => WCF::getLanguage()->get('wcf.user.profile.content.recentActivity.noEntries'),
'userID' => $userID
]);