From ac04ff88b849a331b3628d74fc5d83f440cee3dd Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 13 Jan 2020 17:10:11 +0000 Subject: [PATCH] Improved code --- mod/network.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mod/network.php b/mod/network.php index e71bbe910e..acf6c62716 100644 --- a/mod/network.php +++ b/mod/network.php @@ -940,11 +940,10 @@ function network_tabs(App $a) if (!empty($_GET['cid'])) { $parameters['cid'] = $_GET['cid']; } - $query = '?' . http_build_query($parameters); $tabs[] = [ 'label' => L10n::t('Personal'), - 'url' => str_replace('/new', '', $cmd) . $query, + 'url' => str_replace('/new', '', $cmd) . '?' . http_build_query($parameters), 'sel' => $conv_active, 'title' => L10n::t('Posts that mention or involve you'), 'id' => 'personal-tab', @@ -973,11 +972,10 @@ function network_tabs(App $a) if (!empty($_GET['cid'])) { $parameters['cid'] = $_GET['cid']; } - $query = '?' . http_build_query($parameters); $tabs[] = [ 'label' => L10n::t('Shared Links'), - 'url' => str_replace('/new', '', $cmd) . $query, + 'url' => str_replace('/new', '', $cmd) . '?' . http_build_query($parameters), 'sel' => $bookmarked_active, 'title' => L10n::t('Interesting Links'), 'id' => 'shared-links-tab', @@ -989,11 +987,10 @@ function network_tabs(App $a) if (!empty($_GET['cid'])) { $parameters['cid'] = $_GET['cid']; } - $query = '?' . http_build_query($parameters); $tabs[] = [ 'label' => L10n::t('Starred'), - 'url' => str_replace('/new', '', $cmd) . $query, + 'url' => str_replace('/new', '', $cmd) . '?' . http_build_query($parameters), 'sel' => $starred_active, 'title' => L10n::t('Favourite Posts'), 'id' => 'starred-posts-tab', -- 2.39.5