X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fphotos.php;h=9f92c11370f54d09bba71e98628bc083b7bab2a1;hb=9718fffd71856f98815ecc8375afddd6b22b070c;hp=fcff73a97b113030fbdd944425c18a485d7a3616;hpb=b3856a797bcd3e54197f9014eaeef8bc813fc281;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index fcff73a97b..9f92c11370 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -785,6 +785,13 @@ function photos_content(&$a) { intval($a->pager['itemspage']) ); + + if((local_user()) && (local_user() == $i1[0]['uid'])) { + q("UPDATE `item` SET `unseen` = 0 WHERE `parent` = %d and `uid` = %d", + intval($i1[0]['parent']), + intval(local_user()) + ); + } } $o .= '
' . $ph[0]['desc'] . '
'; @@ -837,21 +844,21 @@ function photos_content(&$a) { $o .= '
'; $o .= $likebuttons; $o .= '
'; - } - if(can_write_wall($a,$a->data['user']['uid'])) { - if($i1[0]['last-child']) { - $o .= replace_macros($cmnt_tpl,array( - '$return_path' => $return_url, - '$type' => 'wall-comment', - '$id' => $i1[0]['id'], - '$parent' => $i1[0]['id'], - '$profile_uid' => $a->data['user']['uid'], - '$mylink' => $contact['url'], - '$mytitle' => t('This is you'), - '$myphoto' => $contact['thumb'], - '$ww' => '' - )); + if(can_write_wall($a,$a->data['user']['uid'])) { + if($i1[0]['last-child']) { + $o .= replace_macros($cmnt_tpl,array( + '$return_path' => $return_url, + '$type' => 'wall-comment', + '$id' => $i1[0]['id'], + '$parent' => $i1[0]['id'], + '$profile_uid' => $a->data['user']['uid'], + '$mylink' => $contact['url'], + '$mytitle' => t('This is you'), + '$myphoto' => $contact['thumb'], + '$ww' => '' + )); + } } } @@ -876,6 +883,24 @@ function photos_content(&$a) { $o .= ''; + + if(can_write_wall($a,$a->data['user']['uid'])) { + if($i1[0]['last-child']) { + $o .= replace_macros($cmnt_tpl,array( + '$return_path' => $return_url, + '$type' => 'wall-comment', + '$id' => $i1[0]['id'], + '$parent' => $i1[0]['id'], + '$profile_uid' => $a->data['user']['uid'], + '$mylink' => $contact['url'], + '$mytitle' => t('This is you'), + '$myphoto' => $contact['thumb'], + '$ww' => '' + )); + } + } + + foreach($r as $item) { $comment = ''; $template = $tpl;