$o .= Profile::getEventsReminderHTML();
}
- if (self::$order === 'received') {
- $ordering = '`received`';
- } elseif (self::$order === 'created') {
- $ordering = '`created`';
- } else {
- $ordering = '`commented`';
- }
-
- $o .= $this->conversation->render($items, Conversation::MODE_NETWORK, false, false, $ordering, $this->session->getLocalUserId());
+ $o .= $this->conversation->render($items, Conversation::MODE_NETWORK, false, false, $this->getOrder(), $this->session->getLocalUserId());
if ($this->pConfig->get($this->session->getLocalUserId(), 'system', 'infinite_scroll')) {
$o .= HTML::scrollLoader();
return $o;
}
+ protected function getOrder(): string
+ {
+ if (self::$order === 'received') {
+ return '`received`';
+ } elseif (self::$order === 'created') {
+ return '`created`';
+ } else {
+ return '`commented`';
+ }
+ }
+
/**
* Sets items as seen
*
System::htmlUpdateExit($o);
}
- $items = $this->getItems();
-
- if (self::$order === 'received') {
- $ordering = '`received`';
- } elseif (self::$order === 'created') {
- $ordering = '`created`';
- } else {
- $ordering = '`commented`';
- }
-
- $o = $this->conversation->render($items, Conversation::MODE_NETWORK, $profile_uid, false, $ordering, $this->session->getLocalUserId());
+ $o = $this->conversation->render($this->getItems(), Conversation::MODE_NETWORK, $profile_uid, false, $this->getOrder(), $this->session->getLocalUserId());
System::htmlUpdateExit($o);
}