aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Activity_filter.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-06-09 10:58:01 +0200
committerMario Vavti <mario@mariovavti.com>2018-06-09 10:58:01 +0200
commitc4778e5e2494d262c18dd73815fb495964355fce (patch)
tree6960a7336c13e3aa6e0bd9b6a1cedf1d9595f95f /Zotlabs/Widget/Activity_filter.php
parentd5ee8d80ab2db542fb14bbeaab5707665b9e3590 (diff)
downloadvolse-hubzilla-c4778e5e2494d262c18dd73815fb495964355fce.tar.gz
volse-hubzilla-c4778e5e2494d262c18dd73815fb495964355fce.tar.bz2
volse-hubzilla-c4778e5e2494d262c18dd73815fb495964355fce.zip
restrict cid filter to unthreaded order (makes much more sense that way imho and the query is a lot faster) and slighty change order of the filters
Diffstat (limited to 'Zotlabs/Widget/Activity_filter.php')
-rw-r--r--Zotlabs/Widget/Activity_filter.php65
1 files changed, 32 insertions, 33 deletions
diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php
index 78e439fdd..fadf39144 100644
--- a/Zotlabs/Widget/Activity_filter.php
+++ b/Zotlabs/Widget/Activity_filter.php
@@ -76,6 +76,38 @@ class Activity_filter {
}
}
+ if(feature_enabled(local_channel(),'forums_tab')) {
+ $forums = get_forum_channels(local_channel());
+
+ if($forums) {
+ foreach($forums as $f) {
+ if(x($_GET,'pf') && x($_GET,'cid')) {
+ $forum_active = ((x($_GET,'pf') && $_GET['cid'] == $f['abook_id']) ? 'active' : '');
+ $filter_active = 'forums';
+ }
+ $fsub[] = [
+ 'label' => $f['xchan_name'],
+ 'img' => $f['xchan_photo_s'],
+ 'url' => (($f['private_forum']) ? $f['xchan_url'] : z_root() . '/' . $cmd . '/?f=&pf=1&cid=' . $f['abook_id']),
+ 'sel' => $forum_active,
+ 'title' => t('Show posts to this forum'),
+ 'lock' => (($f['private_forum']) ? 'lock' : '')
+ ];
+ }
+
+ $tabs[] = [
+ 'id' => 'forums',
+ 'label' => t('Forums'),
+ 'icon' => 'comments-o',
+ 'url' => '#',
+ 'sel' => (($filter_active == 'forums') ? true : false),
+ 'title' => t('Show forums'),
+ 'sub' => $fsub
+
+ ];
+ }
+ }
+
if(feature_enabled(local_channel(),'filing')) {
$terms = q("select distinct term from term where uid = %d and ttype = %d order by term asc",
intval(local_channel()),
@@ -110,39 +142,6 @@ class Activity_filter {
}
}
- if(feature_enabled(local_channel(),'forums_tab')) {
- $forums = get_forum_channels(local_channel());
-
- if($forums) {
- foreach($forums as $f) {
- if(x($_GET,'pf') && x($_GET,'cid')) {
- $forum_active = ((x($_GET,'pf') && $_GET['cid'] == $f['abook_id']) ? 'active' : '');
- $filter_active = 'forums';
- }
- $fsub[] = [
- 'label' => $f['xchan_name'],
- 'img' => $f['xchan_photo_s'],
- 'url' => (($f['private_forum']) ? $f['xchan_url'] : z_root() . '/' . $cmd . '/?f=&pf=1&cid=' . $f['abook_id']),
- 'sel' => $forum_active,
- 'title' => t('Show posts to this forum'),
- 'lock' => (($f['private_forum']) ? 'lock' : '')
- ];
- }
-
- $tabs[] = [
- 'id' => 'forums',
- 'label' => t('Forums'),
- 'icon' => 'comments-o',
- 'url' => '#',
- 'sel' => (($filter_active == 'forums') ? true : false),
- 'title' => t('Show forums'),
- 'sub' => $fsub
-
- ];
- }
- }
-
-
if(x($_GET,'search')) {
$filter_active = 'search';
$tabs[] = [