aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Network.php13
-rw-r--r--Zotlabs/Module/Ping.php2
2 files changed, 10 insertions, 5 deletions
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php
index 013e9b763..6a24b9453 100644
--- a/Zotlabs/Module/Network.php
+++ b/Zotlabs/Module/Network.php
@@ -136,6 +136,7 @@ class Network extends \Zotlabs\Web\Controller {
$file = ((x($_GET,'file')) ? $_GET['file'] : '');
$xchan = ((x($_GET,'xchan')) ? $_GET['xchan'] : '');
$net = ((x($_GET,'net')) ? $_GET['net'] : '');
+ $pf = ((x($_GET,'pf')) ? $_GET['pf'] : '');
$deftag = '';
@@ -156,7 +157,7 @@ class Network extends \Zotlabs\Web\Controller {
goaway(z_root() . '/network');
// NOTREACHED
}
- if($_GET['pf'] === '1')
+ if($pf)
$deftag = '!{' . (($cid_r[0]['xchan_addr']) ? $cid_r[0]['xchan_addr'] : $cid_r[0]['xchan_url']) . '}';
else
$def_acl = [ 'allow_cid' => '<' . $cid_r[0]['abook_xchan'] . '>', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '' ];
@@ -261,8 +262,11 @@ class Network extends \Zotlabs\Web\Controller {
$item_thread_top = '';
if($load || $update) {
- $p1 = q("SELECT DISTINCT parent FROM item WHERE uid = " . intval(local_channel()) . " AND ( author_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' OR owner_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' ) $item_normal ORDER BY created DESC");
- $p2 = q("SELECT oid AS parent FROM term WHERE uid = " . intval(local_channel()) . " AND term = '" . dbesc($cid_r[0]['xchan_name']) . "'");
+ $ttype = (($pf) ? TERM_FORUM : TERM_MENTION);
+
+ $p1 = q("SELECT DISTINCT parent FROM item WHERE uid = " . intval(local_channel()) . " AND ( author_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' OR owner_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' ) $item_normal ");
+ $p2 = q("SELECT oid AS parent FROM term WHERE uid = " . intval(local_channel()) . " AND ttype = $ttype AND term = '" . dbesc($cid_r[0]['xchan_name']) . "'");
+
$p_str = ids_to_querystr(array_merge($p1,$p2),'parent');
$sql_extra = " AND item.parent IN ( $p_str ) ";
}
@@ -347,7 +351,8 @@ class Network extends \Zotlabs\Web\Controller {
'$mid' => '',
'$verb' => $verb,
'$net' => $net,
- '$dbegin' => $datequery2
+ '$dbegin' => $datequery2,
+ '$pf' => (($pf) ? $pf : '0'),
));
}
diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php
index d95df34a0..baefe62ec 100644
--- a/Zotlabs/Module/Ping.php
+++ b/Zotlabs/Module/Ping.php
@@ -645,7 +645,7 @@ class Ping extends \Zotlabs\Web\Controller {
dbesc($forums[$x]['xchan_hash'])
);
if($r[0]['unseen']) {
- $forums[$x]['notify_link'] = (($forums[$x]['private_forum']) ? $forums[$x]['xchan_url'] : z_root() . '/network/?f=&cid=' . $forums[$x]['abook_id']);
+ $forums[$x]['notify_link'] = (($forums[$x]['private_forum']) ? $forums[$x]['xchan_url'] : z_root() . '/network/?f=&pf=1&cid=' . $forums[$x]['abook_id']);
$forums[$x]['name'] = $forums[$x]['xchan_name'];
$forums[$x]['url'] = $forums[$x]['xchan_url'];
$forums[$x]['photo'] = $forums[$x]['xchan_photo_s'];