Allow quick access to mail and connections from Channel Manager

This commit is contained in:
Stefan Parviainen
2014-12-27 14:06:09 +01:00
parent 6a679d26ce
commit 40a327b68f
2 changed files with 8 additions and 3 deletions

View File

@@ -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());
}