mirror of
https://github.com/friendica/friendica
synced 2025-04-26 15:50:10 +00:00
Issue 13909: Filter channels by network (#13924)
This commit is contained in:
parent
d95c9d28a8
commit
71384e6f39
8 changed files with 21 additions and 4 deletions
|
@ -118,6 +118,7 @@ class Engagement
|
|||
'searchtext' => $searchtext,
|
||||
'size' => self::getContentSize($parent),
|
||||
'created' => $parent['created'],
|
||||
'network' => $parent['network'],
|
||||
'restricted' => !in_array($item['network'], Protocol::FEDERATED) || ($parent['private'] != Item::PUBLIC),
|
||||
'comments' => DBA::count('post', ['parent-uri-id' => $item['parent-uri-id'], 'gravity' => Item::GRAVITY_COMMENT]),
|
||||
'activities' => DBA::count('post', [
|
||||
|
|
|
@ -65,8 +65,6 @@ class Network extends Timeline
|
|||
/** @var int */
|
||||
protected $circleId;
|
||||
/** @var string */
|
||||
protected $network;
|
||||
/** @var string */
|
||||
protected $dateFrom;
|
||||
/** @var string */
|
||||
protected $dateTo;
|
||||
|
|
|
@ -74,6 +74,8 @@ class Timeline extends BaseModule
|
|||
protected $raw;
|
||||
/** @var string */
|
||||
protected $order;
|
||||
/** @var string */
|
||||
protected $network;
|
||||
|
||||
/** @var App\Mode $mode */
|
||||
protected $mode;
|
||||
|
@ -372,6 +374,10 @@ class Timeline extends BaseModule
|
|||
|
||||
$this->setMaxMinByOrder($request);
|
||||
|
||||
if (!empty($this->network)) {
|
||||
$condition = DBA::mergeConditions($condition, ['network' => $this->network]);
|
||||
}
|
||||
|
||||
if (($this->selectedTab != ChannelEntity::LANGUAGE) && !is_numeric($this->selectedTab)) {
|
||||
$condition = $this->addLanguageCondition($uid, $condition);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue