From 663ba65f17ea821d5675a26280f955c0056203cf Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 30 Nov 2018 05:43:07 -0500 Subject: [PATCH] Remove "all" value for nets parameter --- mod/network.php | 11 +++-------- src/Content/Nav.php | 2 +- src/Module/Contact.php | 3 --- view/templates/contact_edit.tpl | 2 +- view/templates/nets.tpl | 2 +- view/theme/frio/templates/contact_edit.tpl | 2 +- view/theme/frio/templates/nets.tpl | 2 +- view/theme/quattro/templates/nets.tpl | 2 +- view/theme/vier/templates/contact_edit.tpl | 2 +- 9 files changed, 10 insertions(+), 18 deletions(-) diff --git a/mod/network.php b/mod/network.php index 594a557997..e4e1dd3c53 100644 --- a/mod/network.php +++ b/mod/network.php @@ -65,7 +65,7 @@ function network_init(App $a) $cid = 0; if (x($_GET, 'cid') && intval($_GET['cid']) != 0) { $cid = $_GET['cid']; - $_GET['nets'] = 'all'; + $_GET['nets'] = ''; $group_id = 0; } @@ -86,7 +86,7 @@ function network_init(App $a) // fetch last used network view and redirect if needed if (!$is_a_date_query) { - $sel_nets = defaults($_GET, 'nets', false); + $sel_nets = defaults($_GET, 'nets', ''); $sel_tabs = network_query_get_sel_tab($a); $sel_groups = network_query_get_sel_group($a); $last_sel_tabs = PConfig::get(local_user(), 'network.view', 'tab.selected'); @@ -137,7 +137,7 @@ function network_init(App $a) } } - if ($sel_nets !== false) { + if ($sel_nets) { $net_args['nets'] = $sel_nets; } @@ -151,11 +151,6 @@ function network_init(App $a) } } - // If nets is set to all, unset it - if (x($_GET, 'nets') && $_GET['nets'] === 'all') { - unset($_GET['nets']); - } - if (!x($a->page, 'aside')) { $a->page['aside'] = ''; } diff --git a/src/Content/Nav.php b/src/Content/Nav.php index b8691e9340..7311f046a1 100644 --- a/src/Content/Nav.php +++ b/src/Content/Nav.php @@ -234,7 +234,7 @@ class Nav // The following nav links are only show to logged in users if (local_user()) { $nav['network'] = ['network', L10n::t('Network'), '', L10n::t('Conversations from your friends')]; - $nav['net_reset'] = ['network/0?f=&order=comment&nets=all', L10n::t('Network Reset'), '', L10n::t('Load Network page with no filters')]; + $nav['net_reset'] = ['network/?f=', L10n::t('Network Reset'), '', L10n::t('Load Network page with no filters')]; $nav['home'] = ['profile/' . $a->user['nickname'], L10n::t('Home'), '', L10n::t('Your posts and conversations')]; diff --git a/src/Module/Contact.php b/src/Module/Contact.php index 66e8c97fdf..12575064b9 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -40,9 +40,6 @@ class Contact extends BaseModule } $nets = defaults($_GET, 'nets', ''); - if ($nets == 'all') { - $nets = ''; - } if (!x($a->page, 'aside')) { $a->page['aside'] = ''; diff --git a/view/templates/contact_edit.tpl b/view/templates/contact_edit.tpl index b4c34f74e2..590af0205d 100644 --- a/view/templates/contact_edit.tpl +++ b/view/templates/contact_edit.tpl @@ -46,7 +46,7 @@ {{* End of contact-edit-status-wrapper *}} diff --git a/view/templates/nets.tpl b/view/templates/nets.tpl index ea28bc665c..c27e8367cc 100644 --- a/view/templates/nets.tpl +++ b/view/templates/nets.tpl @@ -2,7 +2,7 @@

{{$title}}

{{$desc}}
- {{$all}} + {{$all}}
{{* End of contact-edit-status-wrapper *}} diff --git a/view/theme/frio/templates/nets.tpl b/view/theme/frio/templates/nets.tpl index da637e7cf7..4f9bfe22f4 100644 --- a/view/theme/frio/templates/nets.tpl +++ b/view/theme/frio/templates/nets.tpl @@ -3,7 +3,7 @@

{{$title}}

{{$desc}}