Merge branch 'master' into tres
Conflicts: include/Contact.php include/ItemObject.php include/api.php include/attach.php include/diaspora.php include/dir_fns.php include/enotify.php include/event.php include/expire.php include/items.php include/notifier.php include/notify.php include/photos.php include/taxonomy.php include/text.php include/widgets.php include/zot.php mod/admin.php mod/channel.php mod/dirsearch.php mod/display.php mod/editwebpage.php mod/events.php mod/home.php mod/item.php mod/manage.php mod/mood.php mod/network.php mod/page.php mod/photos.php mod/ping.php mod/post.php mod/thing.php mod/viewsrc.php view/css/mod_events.css
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
function manage_content(&$a) {
|
||||
|
||||
if(! get_account_id()) {
|
||||
if((! get_account_id()) || ($_SESSION['delegate'])) {
|
||||
notice( t('Permission denied.') . EOL);
|
||||
return;
|
||||
}
|
||||
@@ -57,8 +57,7 @@ function manage_content(&$a) {
|
||||
|
||||
|
||||
$c = q("SELECT id, item_restrict, item_wall FROM item
|
||||
WHERE (item_restrict = %d) and item_unseen = 1 and uid = %d",
|
||||
intval(ITEM_VISIBLE),
|
||||
WHERE item_restrict = 0 and item_unseen = 1 and uid = %d",
|
||||
intval($channels[$x]['channel_id'])
|
||||
);
|
||||
|
||||
@@ -144,6 +143,22 @@ function manage_content(&$a) {
|
||||
array( 'new_channel', t('Create a new channel'), t('Create a new channel'))
|
||||
);
|
||||
|
||||
$delegates = q("select * from abook left join xchan on abook_xchan = xchan_hash where
|
||||
abook_channel = %d and (abook_their_perms & %d) > 0",
|
||||
intval(local_channel()),
|
||||
intval(PERMS_A_DELEGATE)
|
||||
);
|
||||
if(! $delegates)
|
||||
$delegates = null;
|
||||
|
||||
if($delegates) {
|
||||
for($x = 0; $x < count($delegates); $x ++) {
|
||||
$delegates[$x]['link'] = 'magic?f=&dest=' . urlencode($delegates[$x]['xchan_url']) . '&delegate=' . urlencode($delegates[$x]['xchan_addr']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$o = replace_macros(get_markup_template('channels.tpl'), array(
|
||||
'$header' => t('Channel Manager'),
|
||||
'$msg_selected' => t('Current Channel'),
|
||||
@@ -153,9 +168,12 @@ 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'),
|
||||
'$mail_format' => t('%d new messages'),
|
||||
'$intros_format' => t('%d new introductions'),
|
||||
'$channel_usage_message' => $channel_usage_message,
|
||||
'$delegate_header' => t('Delegated Channels'),
|
||||
'$delegates' => $delegates,
|
||||
|
||||
));
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user