1
0
Fork 0

Merge pull request #6216 from MrPetovan/bug/6211-fix-contact-nets-all

Remove "all" value for nets parameter
This commit is contained in:
Michael Vogel 2018-12-02 17:33:43 +01:00 committed by GitHub
commit e4526800a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 10 additions and 18 deletions

View file

@ -65,7 +65,7 @@ function network_init(App $a)
$cid = 0;
if (!empty($_GET['cid'])) {
$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 (!empty($_GET['nets']) && $_GET['nets'] === 'all') {
unset($_GET['nets']);
}
if (empty($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 (empty($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 *}}