From f8c33243bf0440c6ddab63dbf3a755e4d506122b Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 9 Dec 2012 18:07:36 -0800 Subject: start to whip the permissions into shape, also got rid of the mce drop shadow until we can figure out how to do it without the ugly black bars. I tend to prefer "outy" shadows over "inny" shadows anyway, but maybe that's just me. --- mod/photos.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'mod/photos.php') diff --git a/mod/photos.php b/mod/photos.php index c98655df3..ee0a930fd 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -25,6 +25,9 @@ function photos_init(&$a) { $a->data['channel'] = $r[0]; + $observer = $a->get_observer(); + $a->data['perms'] = get_all_perms($r[0]['channel_id'],(($observer) ? $observer['xchan_hash'] : '')); + $o .= '
'; $o .= '
' . $a->data['channel']['channel_name'] . '
'; $o .= '
' . $a->data['channel']['channel_name'] . '
'; @@ -1394,7 +1397,7 @@ function photos_content(&$a) { $likebuttons = ''; - if($can_post || can_write_wall($a,$owner_uid)) { + if($can_post || $a->data['perms']['post_comments']) { $likebuttons = replace_macros($like_tpl,array( '$id' => $link_item['id'], '$likethis' => t("I like this \x28toggle\x29"), @@ -1406,7 +1409,7 @@ function photos_content(&$a) { $comments = ''; if(! count($r)) { - if($can_post || can_write_wall($a,$owner_uid)) { + if($can_post || $a->data['perms']['post_comments']) { $comments .= replace_macros($cmnt_tpl,array( '$return_path' => '', '$jsreload' => $return_url, @@ -1444,7 +1447,7 @@ function photos_content(&$a) { - if($can_post || can_write_wall($a,$owner_uid)) { + if($can_post || $a->data['perms']['post_comments']) { $comments .= replace_macros($cmnt_tpl,array( '$return_path' => '', '$jsreload' => $return_url, @@ -1471,7 +1474,7 @@ function photos_content(&$a) { $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ; - if($can_post || can_write_wall($a,$owner_uid)) { + if($can_post || $a->data['perms']['post_comments']) { $comments .= replace_macros($cmnt_tpl,array( '$return_path' => '', '$jsreload' => $return_url, -- cgit v1.2.3