From 5e1335ac892ce07bf7b1a3a043f71b8abbed8dba Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 4 Jul 2011 21:52:21 -0700 Subject: [PATCH] don't show delete buttons on community page --- include/conversation.php | 13 +++++++++++-- mod/community.php | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 40981d5f4d..6c60b0b917 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -101,6 +101,11 @@ function conversation(&$a, $items, $mode, $update) { $page_writeable = can_write_wall($a,$profile_owner); } + if($mode === 'community') { + $profile_owner = 0; + $page_writeable = false; + } + if($update) $return_url = $_SESSION['return_url']; else @@ -122,7 +127,7 @@ function conversation(&$a, $items, $mode, $update) { if(count($items)) { - if($mode === 'network-new' || $mode === 'search') { + if($mode === 'network-new' || $mode === 'search' || $mode === 'community') { // "New Item View" on network page or search page results // - just loop through the items and format them minimally for display @@ -174,8 +179,12 @@ function conversation(&$a, $items, $mode, $update) { $drop = ''; localize_item($item); + if($mode === 'network-new') + $t = $droptpl; + else + $t = $fakedrop; - $drop = replace_macros($droptpl,array('$id' => $item['id'])); + $drop = replace_macros($t,array('$id' => $item['id'])); $lock = '
'; $star = ''; diff --git a/mod/community.php b/mod/community.php index b10e3bfda8..90cb7a5745 100644 --- a/mod/community.php +++ b/mod/community.php @@ -77,7 +77,7 @@ function community_content(&$a, $update = 0) { // we behave the same in message lists as the search module - $o .= conversation($a,$r,'search',false); + $o .= conversation($a,$r,'community',false); $o .= paginate($a);