aboutsummaryrefslogtreecommitdiffstats
path: root/mod/manage.php
diff options
context:
space:
mode:
authorChristian Vogeley <christian.vogeley@hotmail.de>2015-01-11 16:22:59 +0100
committerChristian Vogeley <christian.vogeley@hotmail.de>2015-01-11 16:22:59 +0100
commitf0c7612bcd49d32e408e67ac1829ee891c677f7e (patch)
treed4cff4aa2d728524b631776ffffee71f42056421 /mod/manage.php
parent43f143a211c75138d09ceb89acc48ea7d5c31ca9 (diff)
parent10102ac2ac4d5b02012a9794e23656717ab05556 (diff)
downloadvolse-hubzilla-f0c7612bcd49d32e408e67ac1829ee891c677f7e.tar.gz
volse-hubzilla-f0c7612bcd49d32e408e67ac1829ee891c677f7e.tar.bz2
volse-hubzilla-f0c7612bcd49d32e408e67ac1829ee891c677f7e.zip
Merge remote-tracking branch 'upstream/master'
Conflicts: doc/html/classRedmatrix_1_1Import_1_1Import-members.html doc/html/classRedmatrix_1_1Import_1_1Import.js
Diffstat (limited to 'mod/manage.php')
-rw-r--r--mod/manage.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/mod/manage.php b/mod/manage.php
index 6fb835696..b6e10bf46 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,
));