aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-12-09 18:07:36 -0800
committerfriendica <info@friendica.com>2012-12-09 18:07:36 -0800
commitf8c33243bf0440c6ddab63dbf3a755e4d506122b (patch)
tree24166874ffc80d4da665d7fee43c5da018af86ad /mod/photos.php
parent7f7767064918e95524de324b4520943ee34e04c3 (diff)
downloadvolse-hubzilla-f8c33243bf0440c6ddab63dbf3a755e4d506122b.tar.gz
volse-hubzilla-f8c33243bf0440c6ddab63dbf3a755e4d506122b.tar.bz2
volse-hubzilla-f8c33243bf0440c6ddab63dbf3a755e4d506122b.zip
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.
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php11
1 files changed, 7 insertions, 4 deletions
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 .= '<div class="vcard">';
$o .= '<div class="fn">' . $a->data['channel']['channel_name'] . '</div>';
$o .= '<div id="profile-photo-wrapper"><img class="photo" style="width: 175px; height: 175px;" src="' . $a->get_cached_avatar_image($a->get_baseurl() . '/photo/profile/l/' . $a->data['channel']['channel_id']) . '" alt="' . $a->data['channel']['channel_name'] . '" /></div>';
@@ -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,