aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Activity_filter.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Widget/Activity_filter.php')
-rw-r--r--Zotlabs/Widget/Activity_filter.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php
index 32ab10c77..0fc60ca9b 100644
--- a/Zotlabs/Widget/Activity_filter.php
+++ b/Zotlabs/Widget/Activity_filter.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Widget;
+use App;
use Zotlabs\Lib\Apps;
class Activity_filter {
@@ -16,6 +17,18 @@ class Activity_filter {
$tabs = [];
+ if(x($_GET,'dm')) {
+ $dm_active = (($_GET['dm'] == 1) ? 'active' : '');
+ $filter_active = 'dm';
+ }
+
+ $tabs[] = [
+ 'label' => t('Direct Messages'),
+ 'icon' => 'envelope-o',
+ 'url' => z_root() . '/' . $cmd . '/?f=&dm=1',
+ 'sel' => $dm_active,
+ 'title' => t('Show direct (private) messages')
+ ];
if(Apps::system_app_installed(local_channel(), 'Privacy Groups')) {
$groups = q("SELECT * FROM pgrp WHERE deleted = 0 AND uid = %d ORDER BY gname ASC",
@@ -51,6 +64,7 @@ class Activity_filter {
if(feature_enabled(local_channel(),'forums_tab')) {
$forums = get_forum_channels(local_channel());
+ $channel = App::get_channel();
if($forums) {
foreach($forums as $f) {
@@ -61,7 +75,7 @@ class Activity_filter {
$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']),
+ 'url' => (($f['private_forum']) ? $f['xchan_url'] . '/?f=&zid=' . $channel['xchan_addr'] : 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' : '')