mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 16:14:26 +02:00
Avoid blank network page on database issues
This commit is contained in:
parent
32f8b652ad
commit
47478fe8f7
2 changed files with 13 additions and 6 deletions
|
@ -27,12 +27,17 @@ class Network extends NetworkModule
|
|||
System::htmlUpdateExit($o);
|
||||
}
|
||||
|
||||
if ($this->channel->isTimeline($this->selectedTab) || $this->userDefinedChannel->isTimeline($this->selectedTab, $this->session->getLocalUserId())) {
|
||||
$items = $this->getChannelItems($request, $this->session->getLocalUserId());
|
||||
} elseif ($this->community->isTimeline($this->selectedTab)) {
|
||||
$items = $this->getCommunityItems();
|
||||
} else {
|
||||
$items = $this->getItems();
|
||||
try {
|
||||
if ($this->channel->isTimeline($this->selectedTab) || $this->userDefinedChannel->isTimeline($this->selectedTab, $this->session->getLocalUserId())) {
|
||||
$items = $this->getChannelItems($request, $this->session->getLocalUserId());
|
||||
} elseif ($this->community->isTimeline($this->selectedTab)) {
|
||||
$items = $this->getCommunityItems();
|
||||
} else {
|
||||
$items = $this->getItems();
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Exception when fetching items', ['code' => $e->getCode(), 'message' => $e->getMessage()]);
|
||||
$items = [];
|
||||
}
|
||||
|
||||
$o = $this->conversation->render($items, Conversation::MODE_NETWORK, true, false, $this->getOrder(), $this->session->getLocalUserId());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue