aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-06-05 11:56:30 +0200
committerMario Vavti <mario@mariovavti.com>2018-06-05 11:56:30 +0200
commit7188e719eff137c3a0b47824de97245832441a20 (patch)
tree2bf2f9265b2904501b42d007007db337b0720d4b
parent2328dfc851c0738414c84fa93351da148fd7161d (diff)
downloadvolse-hubzilla-7188e719eff137c3a0b47824de97245832441a20.tar.gz
volse-hubzilla-7188e719eff137c3a0b47824de97245832441a20.tar.bz2
volse-hubzilla-7188e719eff137c3a0b47824de97245832441a20.zip
rely on the pf argument to determine if we deal with a forum or not. xchan_pubforum is not set for all public forums in the forum filters for some reason.
-rw-r--r--Zotlabs/Module/Network.php8
-rwxr-xr-xview/tpl/build_query.tpl2
2 files changed, 7 insertions, 3 deletions
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php
index 1ab94eff4..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,7 +262,7 @@ class Network extends \Zotlabs\Web\Controller {
$item_thread_top = '';
if($load || $update) {
- $ttype = (($cid_r[0]['xchan_pubforum']) ? TERM_FORUM : TERM_MENTION);
+ $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']) . "'");
@@ -350,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/view/tpl/build_query.tpl b/view/tpl/build_query.tpl
index 1d938d395..754d5997c 100755
--- a/view/tpl/build_query.tpl
+++ b/view/tpl/build_query.tpl
@@ -30,6 +30,7 @@
var bParam_mid = "{{$mid}}";
var bParam_verb = "{{$verb}}";
var bParam_net = "{{$net}}";
+ var bParam_pf = "{{$pf}}";
function buildCmd() {
var udargs = ((page_load) ? "/load" : "");
@@ -60,6 +61,7 @@
if(bParam_verb != "") bCmd = bCmd + "&verb=" + bParam_verb;
if(bParam_net != "") bCmd = bCmd + "&net=" + bParam_net;
if(bParam_page != 1) bCmd = bCmd + "&page=" + bParam_page;
+ if(bParam_pf != 0) bCmd = bCmd + "&pf=" + bParam_pf;
return(bCmd);
}