'accesskey' => 'y'
];
- $tabs[] = [
- 'label' => $this->l10n->t('Followers'),
- 'url' => 'channel/' . self::FOLLOWERS,
- 'sel' => self::$content == self::FOLLOWERS ? 'active' : '',
- 'title' => $this->l10n->t('Posts from your followers that you don\'t follow'),
- 'id' => 'channel-followers-tab',
- 'accesskey' => 'f'
- ];
-
$tabs[] = [
'label' => $this->l10n->t('What\'s Hot'),
'url' => 'channel/' . self::WHATSHOT,
'accesskey' => 'h'
];
+ $language = User::getLanguageCode($this->session->getLocalUserId(), false);
+ $languages = $this->l10n->getAvailableLanguages();
+
+ $tabs[] = [
+ 'label' => $languages[$language],
+ 'url' => 'channel/' . self::LANGUAGE,
+ 'sel' => self::$content == self::LANGUAGE ? 'active' : '',
+ 'title' => $this->l10n->t('Posts in %s', $languages[$language]),
+ 'id' => 'channel-language-tab',
+ 'accesskey' => 'g'
+ ];
+
+ $tabs[] = [
+ 'label' => $this->l10n->t('Followers'),
+ 'url' => 'channel/' . self::FOLLOWERS,
+ 'sel' => self::$content == self::FOLLOWERS ? 'active' : '',
+ 'title' => $this->l10n->t('Posts from your followers that you don\'t follow'),
+ 'id' => 'channel-followers-tab',
+ 'accesskey' => 'f'
+ ];
+
$tabs[] = [
'label' => $this->l10n->t('Images'),
'url' => 'channel/' . self::IMAGE,
'accesskey' => 'i'
];
- $tabs[] = [
- 'label' => $this->l10n->t('Videos'),
- 'url' => 'channel/' . self::VIDEO,
- 'sel' => self::$content == self::VIDEO ? 'active' : '',
- 'title' => $this->l10n->t('Posts with videos'),
- 'id' => 'channel-video-tab',
- 'accesskey' => 'v'
- ];
-
$tabs[] = [
'label' => $this->l10n->t('Audio'),
'url' => 'channel/' . self::AUDIO,
'accesskey' => 'd'
];
- $language = User::getLanguageCode($this->session->getLocalUserId(), false);
- $languages = $this->l10n->getAvailableLanguages();
-
$tabs[] = [
- 'label' => $languages[$language],
- 'url' => 'channel/' . self::LANGUAGE,
- 'sel' => self::$content == self::LANGUAGE ? 'active' : '',
- 'title' => $this->l10n->t('Posts in %s', $languages[$language]),
- 'id' => 'channel-language-tab',
- 'accesskey' => 'g'
+ 'label' => $this->l10n->t('Videos'),
+ 'url' => 'channel/' . self::VIDEO,
+ 'sel' => self::$content == self::VIDEO ? 'active' : '',
+ 'title' => $this->l10n->t('Posts with videos'),
+ 'id' => 'channel-video-tab',
+ 'accesskey' => 'v'
];
$tab_tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
} else {
$condition = ["(`comments` >= ? OR `activities` >= ?) AND `contact-type` != ?", $this->getMedianComments(4), $this->getMedianActivities(4), Contact::TYPE_COMMUNITY];
}
-
- $condition = $this->addLanguageCondition($condition);
} elseif (self::$content == self::FORYOU) {
$cid = Contact::getPublicIdByUserId($this->session->getLocalUserId());
$condition = ["JSON_EXTRACT(JSON_KEYS(language), '$[0]') = ?", User::getLanguageCode($this->session->getLocalUserId(), true)];
}
+ if (self::$content != self::LANGUAGE) {
+ $condition = $this->addLanguageCondition($condition);
+ }
+
$condition[0] .= " AND NOT EXISTS(SELECT `cid` FROM `user-contact` WHERE `uid` = ? AND `cid` = `post-engagement`.`owner-id` AND (`ignored` OR `blocked` OR `collapsed`))";
$condition[] = $this->session->getLocalUserId();