aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorRedMatrix <info@friendica.com>2014-12-29 09:29:12 +1100
committerRedMatrix <info@friendica.com>2014-12-29 09:29:12 +1100
commit7b98a6fcb036d1c0d99b73c308631e17093e5af1 (patch)
treebcd14cafecffaaaeae083ec0a5370110494d458b /mod
parent6cdd5d1c4806ae91ee3326b096ea79597dd95409 (diff)
parent40a327b68fe1bb37bbc2fc6bc1c6d761ee564898 (diff)
downloadvolse-hubzilla-7b98a6fcb036d1c0d99b73c308631e17093e5af1.tar.gz
volse-hubzilla-7b98a6fcb036d1c0d99b73c308631e17093e5af1.tar.bz2
volse-hubzilla-7b98a6fcb036d1c0d99b73c308631e17093e5af1.zip
Merge pull request #772 from pafcu/chanman
Some work on the channel manager
Diffstat (limited to 'mod')
-rw-r--r--mod/manage.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/mod/manage.php b/mod/manage.php
index 00c6db7f0..21327a120 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());
}
@@ -49,7 +54,7 @@ function manage_content(&$a) {
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];
+ $selected_channel = &$channels[$x]; // Needs to be a reference!
$channels[$x]['default'] = (($channels[$x]['channel_id'] == $account['account_default_channel']) ? "1" : '');
$channels[$x]['default_links'] = '1';
@@ -153,6 +158,8 @@ function manage_content(&$a) {
'$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,
));