diff options
author | anaqreon <tamanning@zoho.com> | 2014-12-30 16:06:35 -0600 |
---|---|---|
committer | anaqreon <tamanning@zoho.com> | 2014-12-30 16:06:35 -0600 |
commit | b78a545a1056e6db9f4b6b4f262182b0a5c56e67 (patch) | |
tree | 515c2f742a5a39e18b00debf1849ee9703fa4a42 /mod/manage.php | |
parent | d67c5a6ffd134602084a6dcb37b316bf768bf715 (diff) | |
parent | 43671a0a323afa758df56c06822ce3c46da026df (diff) | |
download | volse-hubzilla-b78a545a1056e6db9f4b6b4f262182b0a5c56e67.tar.gz volse-hubzilla-b78a545a1056e6db9f4b6b4f262182b0a5c56e67.tar.bz2 volse-hubzilla-b78a545a1056e6db9f4b6b4f262182b0a5c56e67.zip |
Merge pull request #1 from friendica/master
Pull from upstream
Diffstat (limited to 'mod/manage.php')
-rw-r--r-- | mod/manage.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/mod/manage.php b/mod/manage.php index 00c6db7f0..b0de945bf 100644 --- a/mod/manage.php +++ b/mod/manage.php @@ -28,8 +28,13 @@ function manage_content(&$a) { if($change_channel) { $r = change_channel($change_channel); - if($r && $r['channel_startpage']) - goaway(z_root() . '/' . $r['channel_startpage']); + if((argc() > 2) && !(argv(2) === 'default')) { + goaway(z_root() . '/' . implode('/',array_slice($a->argv,2))); // Go to whatever is after /manage/, but with the new channel + } + else { + if($r && $r['channel_startpage']) + goaway(z_root() . '/' . $r['channel_startpage']); // If nothing extra is specified, go to the default page + } goaway(z_root()); } @@ -41,15 +46,12 @@ function manage_content(&$a) { intval(PAGE_REMOVED) ); - $selected_channel = null; $account = get_app()->get_account(); if($r && count($r)) { $channels = $r; for($x = 0; $x < count($channels); $x ++) { $channels[$x]['link'] = 'manage/' . intval($channels[$x]['channel_id']); - if($channels[$x]['channel_id'] == local_user()) - $selected_channel = $channels[$x]; $channels[$x]['default'] = (($channels[$x]['channel_id'] == $account['account_default_channel']) ? "1" : ''); $channels[$x]['default_links'] = '1'; @@ -147,12 +149,14 @@ function manage_content(&$a) { $o = replace_macros(get_markup_template('channels.tpl'), array( '$header' => t('Channel Manager'), '$msg_selected' => t('Current Channel'), - '$selected' => $selected_channel, - '$desc' => t('Attach to one of your channels by selecting it.'), + '$selected' => local_user(), + '$desc' => t('Switch to one of your channels by selecting it.'), '$msg_default' => t('Default Channel'), '$msg_make_default' => t('Make Default'), '$links' => $links, '$all_channels' => $channels, + '$mail_format' => t('%d new messages'), + '$intros_format' => t('%d new introductions'), '$channel_usage_message' => $channel_usage_message, )); |