From 07f82e4a148eb11188e3182b42ae5d683c37e298 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Fri, 28 Sep 2018 00:05:43 +0200 Subject: Update Network.php --- Zotlabs/Module/Network.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module/Network.php') diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index ffe605538..e7b150faf 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -108,7 +108,7 @@ class Network extends \Zotlabs\Web\Controller { // filter by collection (e.g. group) if($gid) { - $r = q("SELECT * FROM groups WHERE id = %d AND uid = %d LIMIT 1", + $r = q("SELECT * FROM pgrp WHERE id = %d AND uid = %d LIMIT 1", intval($gid), intval(local_channel()) ); -- cgit v1.2.3 From 5906d6cce373df81458bf16d461bee9705fed3a6 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 29 Sep 2018 18:00:14 +0200 Subject: improve network search --- Zotlabs/Module/Network.php | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'Zotlabs/Module/Network.php') diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index e7b150faf..73f09f90b 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -84,18 +84,7 @@ class Network extends \Zotlabs\Web\Controller { $search = (($_GET['search']) ? $_GET['search'] : ''); if($search) { - $_GET['netsearch'] = escape_tags($search); - if(strpos($search,'@') === 0) { - $r = q("select abook_id from abook left join xchan on abook_xchan = xchan_hash where xchan_name = '%s' and abook_channel = %d limit 1", - dbesc(substr($search,1)), - intval(local_channel()) - ); - if($r) { - $_GET['cid'] = $r[0]['abook_id']; - $search = $_GET['search'] = ''; - } - } - elseif(strpos($search,'#') === 0) { + if(strpos($search,'#') === 0) { $hashtags = substr($search,1); $search = $_GET['search'] = ''; } @@ -143,7 +132,7 @@ class Network extends \Zotlabs\Web\Controller { $deftag = ''; - if(x($_GET,'search') || $file || (!$pf && $cid)) + if(x($_GET,'search') || $file || (!$pf && $cid) || $hashtags || $verb || $category) $nouveau = true; if($cid) { @@ -169,9 +158,9 @@ class Network extends \Zotlabs\Web\Controller { if(! $update) { // search terms header - if($search) { + if($search || $hashtags) { $o .= replace_macros(get_markup_template("section_title.tpl"),array( - '$title' => t('Search Results For:') . ' ' . htmlspecialchars($search, ENT_COMPAT,'UTF-8') + '$title' => t('Search Results For:') . ' ' . (($search) ? htmlspecialchars($search, ENT_COMPAT,'UTF-8') : '#' . htmlspecialchars($hashtags, ENT_COMPAT,'UTF-8')) )); } -- cgit v1.2.3 From cc9ca8bbffaceb7273b4999e538a3d211ae3cf09 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 29 Sep 2018 18:38:19 +0200 Subject: do not unset $_GET[search] and adjust activity_order widget --- Zotlabs/Module/Network.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module/Network.php') diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index 73f09f90b..21507752d 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -86,7 +86,7 @@ class Network extends \Zotlabs\Web\Controller { if($search) { if(strpos($search,'#') === 0) { $hashtags = substr($search,1); - $search = $_GET['search'] = ''; + $search = ''; } } -- cgit v1.2.3 From ff20370d0bd8c08942c062ab105bc839969a3902 Mon Sep 17 00:00:00 2001 From: "M. Dent" Date: Sat, 29 Sep 2018 20:22:27 +0200 Subject: Status editor hook --- Zotlabs/Module/Network.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module/Network.php') diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index 21507752d..919996943 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -196,7 +196,7 @@ class Network extends \Zotlabs\Web\Controller { $x['pretext'] = $deftag; - $status_editor = status_editor($a,$x); + $status_editor = status_editor($a,$x,false,'Network'); $o .= $status_editor; $static = channel_manual_conv_update(local_channel()); -- cgit v1.2.3 From 6e03104e3ee785954b4f755240d1595f702522b2 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 4 Oct 2018 20:48:22 +0200 Subject: move *_list_mode to features --- Zotlabs/Module/Network.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module/Network.php') diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index 919996943..015351cbf 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -437,7 +437,7 @@ class Network extends \Zotlabs\Web\Controller { $abook_uids = " and abook.abook_channel = " . local_channel() . " "; $uids = " and item.uid = " . local_channel() . " "; - if(get_pconfig(local_channel(),'system','network_list_mode')) + if(feature_enabled(local_channel(), 'network_list_mode')) $page_mode = 'list'; else $page_mode = 'client'; -- cgit v1.2.3