From 5505f5fa02f35a9c0b64badb1ff3ff2b791d2a41 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 30 May 2018 22:55:28 +0200 Subject: restrict the network/channel navbar search to content and hashtags --- Zotlabs/Module/Channel.php | 3 +++ Zotlabs/Module/Network.php | 3 +++ 2 files changed, 6 insertions(+) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index dac177c9e..21a6bd122 100644 --- a/Zotlabs/Module/Channel.php +++ b/Zotlabs/Module/Channel.php @@ -18,6 +18,9 @@ class Channel extends \Zotlabs\Web\Controller { function init() { + if(strpos($_GET['search'], ['@', '!', '?']) == 0) + goaway('search' . '?f=&search=' . $_GET['search']); + $which = null; if(argc() > 1) $which = argv(1); diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index acd12158c..64f9e668c 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -15,6 +15,9 @@ class Network extends \Zotlabs\Web\Controller { notice( t('Permission denied.') . EOL); return; } + + if(strpos($_GET['search'], ['@', '!', '?']) == 0) + goaway('search' . '?f=&search=' . $_GET['search']); if(count($_GET) < 2) { $network_options = get_pconfig(local_channel(),'system','network_page_default'); -- cgit v1.2.3