Merge pull request #14738 from MrPetovan/bug/14689-community-empty

Return early if system.max_author_posts_community_page isn't set in Conversation\Timeline->getCommunityItems
This commit is contained in:
Tobias Diekershoff 2025-01-27 06:14:52 +01:00 committed by GitHub
commit fe462398ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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(),