From 1021a4d4763974c3c40f40a0ca9682f1fcc3f6ee Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 1 Nov 2012 17:06:34 -0700 Subject: add current selection to channel manager --- mod/manage.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'mod/manage.php') diff --git a/mod/manage.php b/mod/manage.php index d29830f90..ac4454567 100644 --- a/mod/manage.php +++ b/mod/manage.php @@ -37,20 +37,28 @@ function manage_content(&$a) { intval(get_account_id()) ); + $selected_channel = null; + if($r && count($r)) { $channels = $r; - for($x = 0; $x < count($channels); $x ++) + 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]['primary_links'] = '1'; + } } } $links = array( - array( 'new_channel', t('Create a new channel'), t('New Channel')) + array( 'new_channel', t('Create a new channel'), t('Create a new channel')) ); $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.'), '$msg_primary' => t('Default Channel'), '$msg_make_primary' => t('Make Default'), -- cgit v1.2.3