Merge pull request #3286 from annando/issue-1720

Issue 1720: Group filter and new tab don't like each other
This commit is contained in:
Tobias Diekershoff 2017-04-04 07:50:33 +02:00 committed by GitHub
commit bebff8ebbb

View file

@ -73,6 +73,7 @@ function network_init(App $a) {
$k = array_search('active', $last_sel_tabs); $k = array_search('active', $last_sel_tabs);
if ($k != 3) {
$net_baseurl .= $tab_baseurls[$k]; $net_baseurl .= $tab_baseurls[$k];
// parse out tab queries // parse out tab queries
@ -80,10 +81,12 @@ function network_init(App $a) {
$dest_qs = $tab_args[$k]; $dest_qs = $tab_args[$k];
parse_str($dest_qs, $dest_qa); parse_str($dest_qs, $dest_qa);
$net_args = array_merge($net_args, $dest_qa); $net_args = array_merge($net_args, $dest_qa);
} else {
$remember_tab = false;
} }
else if($sel_tabs[4] === 'active') { } elseif ($sel_tabs[4] === 'active') {
// The '/new' tab is selected // The '/new' tab is selected
$net_baseurl .= '/new'; $remember_group = false;
} }
if ($remember_net) { if ($remember_net) {
@ -842,7 +845,7 @@ function network_tabs(App $a) {
if (feature_enabled(local_user(),'new_tab')) { if (feature_enabled(local_user(),'new_tab')) {
$tabs[] = array( $tabs[] = array(
'label' => t('New'), 'label' => t('New'),
'url' => str_replace('/new', '', $cmd) . ($len_naked_cmd ? '/' : '') . 'new' . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : ''), 'url' => 'network/new' . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : ''),
'sel' => $new_active, 'sel' => $new_active,
'title' => t('Activity Stream - by date'), 'title' => t('Activity Stream - by date'),
'id' => 'activitiy-by-date-tab', 'id' => 'activitiy-by-date-tab',