Return early if system.max_author_posts_community_page isn't set in Conversation\Timeline->getCommunityItems

This commit is contained in:
Hypolite Petovan 2025-01-26 13:55:58 -05:00
parent 5a00a2c441
commit 403a4684e5

View file

@ -691,13 +691,16 @@ class Timeline extends BaseModule
$items = $this->selectItems(); $items = $this->selectItems();
$key = ''; $key = '';
$maxpostperauthor = 0;
if ($this->selectedTab == Community::LOCAL) { if ($this->selectedTab == Community::LOCAL) {
$maxpostperauthor = (int)$this->config->get('system', 'max_author_posts_community_page'); $maxpostperauthor = (int)$this->config->get('system', 'max_author_posts_community_page');
$key = 'author-id'; $key = 'author-id';
} elseif ($this->selectedTab == Community::GLOBAL) { } elseif ($this->selectedTab == Community::GLOBAL) {
$maxpostperauthor = (int)$this->config->get('system', 'max_server_posts_community_page'); $maxpostperauthor = (int)$this->config->get('system', 'max_server_posts_community_page');
$key = 'author-gsid'; $key = 'author-gsid';
} else { }
if ($maxpostperauthor === 0) {
$this->setItemsSeenByCondition([ $this->setItemsSeenByCondition([
'unseen' => true, 'unseen' => true,
'uid' => $this->session->getLocalUserId(), 'uid' => $this->session->getLocalUserId(),