aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Network.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module/Network.php')
-rw-r--r--Zotlabs/Module/Network.php20
1 files changed, 12 insertions, 8 deletions
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php
index 84c2463d6..ee6ff3619 100644
--- a/Zotlabs/Module/Network.php
+++ b/Zotlabs/Module/Network.php
@@ -20,13 +20,15 @@ class Network extends \Zotlabs\Web\Controller {
return;
}
- if(in_array(substr($_GET['search'],0,1),[ '@', '!', '?']) || strpos($_GET['search'], 'https://') === 0)
- goaway('search' . '?f=&search=' . $_GET['search']);
+ $search = $_GET['search'] ?? '';
+
+ if(in_array(substr($search, 0, 1),[ '@', '!', '?']) || strpos($search, 'https://') === 0)
+ goaway(z_root() . '/search?f=&search=' . $search);
if(count($_GET) < 2) {
$network_options = get_pconfig(local_channel(),'system','network_page_default');
if($network_options)
- goaway('network' . '?f=&' . $network_options);
+ goaway(z_root() . '/network?f=&' . $network_options);
}
$channel = App::get_channel();
@@ -80,7 +82,7 @@ class Network extends \Zotlabs\Web\Controller {
break;
}
- $search = (($_GET['search']) ? $_GET['search'] : '');
+ $search = $_GET['search'] ?? '';
if($search) {
if(strpos($search,'#') === 0) {
$hashtags = substr($search,1);
@@ -128,17 +130,19 @@ class Network extends \Zotlabs\Web\Controller {
$pf = ((x($_GET,'pf')) ? $_GET['pf'] : '');
$unseen = ((x($_GET,'unseen')) ? $_GET['unseen'] : '');
- if (Apps::system_app_installed(local_channel(),'Affinity Tool')) {
+ if (Apps::system_app_installed(local_channel(),'Affinity Tool')) {
$affinity_locked = intval(get_pconfig(local_channel(),'affinity','lock',1));
if ($affinity_locked) {
- set_pconfig(local_channel(),'affinity','cmin',$cmin);
- set_pconfig(local_channel(),'affinity','cmax',$cmax);
+ set_pconfig(local_channel(),'affinity','cmin',$cmin);
+ set_pconfig(local_channel(),'affinity','cmax',$cmax);
}
- }
+ }
if(x($_GET,'search') || $file || (!$pf && $cid) || $hashtags || $verb || $category || $conv || $unseen)
$nouveau = true;
+ $cid_r = [];
+
if($cid) {
$cid_r = q("SELECT abook.abook_xchan, xchan.xchan_addr, xchan.xchan_name, xchan.xchan_url, xchan.xchan_photo_s, xchan.xchan_pubforum from abook left join xchan on abook_xchan = xchan_hash where abook_id = %d and abook_channel = %d and abook_blocked = 0 limit 1",
intval($cid),