Remove "all" value for nets parameter

This commit is contained in:
Hypolite Petovan 2018-11-30 05:43:07 -05:00
parent ea4e772b1e
commit 663ba65f17
9 changed files with 10 additions and 18 deletions

View File

@ -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'] = '';
}

View File

@ -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')];

View File

@ -40,9 +40,6 @@ class Contact extends BaseModule
}
$nets = defaults($_GET, 'nets', '');
if ($nets == 'all') {
$nets = '';
}
if (!x($a->page, 'aside')) {
$a->page['aside'] = '';

View File

@ -46,7 +46,7 @@
</ul>
<ul>
<!-- <li><a href="network/0?nets=all&cid={{$contact_id}}" id="contact-edit-view-recent">{{$lblrecent}}</a></li> -->
<!-- <li><a href="network/?cid={{$contact_id}}" id="contact-edit-view-recent">{{$lblrecent}}</a></li> -->
{{if $follow}}<li><div id="contact-edit-follow"><a href="{{$follow}}">{{$follow_text}}</a></div></li>{{/if}}
</ul>
</div> {{* End of contact-edit-status-wrapper *}}

View File

@ -2,7 +2,7 @@
<div id="nets-sidebar" class="widget">
<h3>{{$title}}</h3>
<div id="nets-desc">{{$desc}}</div>
<a href="{{$base}}?nets=all" class="nets-link{{if $sel_all}} nets-selected{{/if}} nets-all">{{$all}}</a>
<a href="{{$base}}" class="nets-link{{if $sel_all}} nets-selected{{/if}} nets-all">{{$all}}</a>
<ul role="menu" class="nets-ul">
{{foreach $nets as $net}}
<li role="menuitem" ><a href="{{$base}}?nets={{$net.ref}}" class="nets-link{{if $net.selected}} nets-selected{{/if}}">{{$net.name}}</a></li>

View File

@ -62,7 +62,7 @@
</ul>
<ul>
<!-- <li><a href="network/0?nets=all&cid={{$contact_id}}" id="contact-edit-view-recent">{{$lblrecent|escape}}</a></li> -->
<!-- <li><a href="network/?cid={{$contact_id}}" id="contact-edit-view-recent">{{$lblrecent|escape}}</a></li> -->
{{if $follow}}<li><div id="contact-edit-follow"><a href="{{$follow}}">{{$follow_text|escape}}</a></div></li>{{/if}}
</ul>
</div> {{* End of contact-edit-status-wrapper *}}

View File

@ -3,7 +3,7 @@
<h3>{{$title}}</h3>
<div id="nets-desc">{{$desc}}</div>
<ul role="menu" class="nets-ul">
<li role="menuitem" {{if $sel_all}}class="selected"{{/if}}><a href="{{$base}}?nets=all" class="nets-link{{if $sel_all}} nets-selected{{/if}} nets-all">{{$all}}</a></li>
<li role="menuitem" {{if $sel_all}}class="selected"{{/if}}><a href="{{$base}}" class="nets-link{{if $sel_all}} nets-selected{{/if}} nets-all">{{$all}}</a></li>
{{foreach $nets as $net}}
<li role="menuitem" {{if $net.selected}}class="selected"{{/if}}><a href="{{$base}}?nets={{$net.ref}}" class="nets-link{{if $net.selected}} nets-selected{{/if}}">{{$net.name}}</a></li>
{{/foreach}}

View File

@ -3,7 +3,7 @@
<div id="nets-desc">{{$desc}}</div>
<ul class="nets-ul">
<li class="tool {{if $sel_all}}selected{{/if}}"><a href="{{$base}}?nets=all" class="nets-link nets-all">{{$all}}</a>
<li class="tool {{if $sel_all}}selected{{/if}}"><a href="{{$base}}" class="nets-link nets-all">{{$all}}</a>
{{foreach $nets as $net}}
<li class="tool {{if $net.selected}}selected{{/if}}"><a href="{{$base}}?f=&nets={{$net.ref}}" class="nets-link">{{$net.name}}</a></li>
{{/foreach}}

View File

@ -47,7 +47,7 @@
</ul>
<ul>
<!-- <li><a href="network/0?nets=all&cid={{$contact_id}}" id="contact-edit-view-recent">{{$lblrecent}}</a></li> -->
<!-- <li><a href="network/?cid={{$contact_id}}" id="contact-edit-view-recent">{{$lblrecent}}</a></li> -->
{{if $follow}}<li><div id="contact-edit-follow"><a href="{{$follow}}">{{$follow_text}}</a></div></li>{{/if}}
</ul>
</div> {{* End of contact-edit-status-wrapper *}}