sforkowany z mirror/friendica
commit
1d512f3ba2
|
@ -16,11 +16,12 @@ function network_init(&$a) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert query string to array. remove friendica args
|
// convert query string to array. remove friendica args
|
||||||
$query_array = array();
|
$query_array = array();
|
||||||
$query_string = str_replace($a->cmd."?", "", $a->query_string);
|
$query_string = str_replace($a->cmd."?", "", $a->query_string);
|
||||||
parse_str($query_string, $query_array);
|
parse_str($query_string, $query_array);
|
||||||
array_shift($query_array);
|
array_shift($query_array);
|
||||||
|
|
||||||
|
|
||||||
// fetch last used network view and redirect if needed
|
// fetch last used network view and redirect if needed
|
||||||
if(! $is_a_date_query) {
|
if(! $is_a_date_query) {
|
||||||
|
@ -73,11 +74,11 @@ function network_init(&$a) {
|
||||||
|
|
||||||
$net_baseurl .= $tab_baseurls[$k];
|
$net_baseurl .= $tab_baseurls[$k];
|
||||||
|
|
||||||
// parse out tab queries
|
// parse out tab queries
|
||||||
$dest_qa = array();
|
$dest_qa = array();
|
||||||
$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 if($sel_tabs[4] === 'active') {
|
else if($sel_tabs[4] === 'active') {
|
||||||
// The '/new' tab is selected
|
// The '/new' tab is selected
|
||||||
|
@ -87,12 +88,16 @@ function network_init(&$a) {
|
||||||
if($remember_net) {
|
if($remember_net) {
|
||||||
$net_args['nets'] = $last_sel_nets;
|
$net_args['nets'] = $last_sel_nets;
|
||||||
}
|
}
|
||||||
|
else if($sel_nets!==false) {
|
||||||
|
$net_args['nets'] = $sel_nets;
|
||||||
|
}
|
||||||
|
|
||||||
if($remember_tab || $remember_net || $remember_group) {
|
if($remember_tab || $remember_net || $remember_group) {
|
||||||
$net_args = array_merge($query_array, $net_args);
|
$net_args = array_merge($query_array, $net_args);
|
||||||
$net_queries = build_querystring($net_args);
|
$net_queries = build_querystring($net_args);
|
||||||
|
|
||||||
$redir_url = ($net_queries ? $net_baseurl."?".$net_queries : $net_baseurl);
|
$redir_url = ($net_queries ? $net_baseurl."?".$net_queries : $net_baseurl);
|
||||||
|
|
||||||
goaway($a->get_baseurl() . $redir_url);
|
goaway($a->get_baseurl() . $redir_url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue