aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-18 17:08:03 -0700
committerfriendica <info@friendica.com>2012-07-18 17:08:03 -0700
commitd92a4a686dd989613cfb628896902c7a4f21c522 (patch)
tree6e255cfe2108602c32b40d9d4c424f790176467e /mod/photos.php
parent0400779b43525de44dab7d076aa184d634aba0f2 (diff)
downloadvolse-hubzilla-d92a4a686dd989613cfb628896902c7a4f21c522.tar.gz
volse-hubzilla-d92a4a686dd989613cfb628896902c7a4f21c522.tar.bz2
volse-hubzilla-d92a4a686dd989613cfb628896902c7a4f21c522.zip
eliminate the obsolete "last-child" indicator
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php97
1 files changed, 43 insertions, 54 deletions
diff --git a/mod/photos.php b/mod/photos.php
index 624f0bdca..ed86fae23 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -415,7 +415,6 @@ function photos_post(&$a) {
$arr['allow_gid'] = $p[0]['allow_gid'];
$arr['deny_cid'] = $p[0]['deny_cid'];
$arr['deny_gid'] = $p[0]['deny_gid'];
- $arr['last-child'] = 1;
$arr['visible'] = $visibility;
$arr['origin'] = 1;
@@ -580,7 +579,6 @@ function photos_post(&$a) {
$arr['allow_gid'] = $p[0]['allow_gid'];
$arr['deny_cid'] = $p[0]['deny_cid'];
$arr['deny_gid'] = $p[0]['deny_gid'];
- $arr['last-child'] = 1;
$arr['visible'] = 1;
$arr['verb'] = ACTIVITY_TAG;
$arr['object-type'] = ACTIVITY_OBJ_PERSON;
@@ -801,7 +799,6 @@ function photos_post(&$a) {
$arr['allow_gid'] = $str_group_allow;
$arr['deny_cid'] = $str_contact_deny;
$arr['deny_gid'] = $str_group_deny;
- $arr['last-child'] = 1;
$arr['visible'] = $visible;
$arr['origin'] = 1;
@@ -1334,23 +1331,21 @@ function photos_content(&$a) {
$comments = '';
if(! count($r)) {
if($can_post || can_write_wall($a,$owner_uid)) {
- if($link_item['last-child']) {
- $comments .= replace_macros($cmnt_tpl,array(
- '$return_path' => '',
- '$jsreload' => $return_url,
- '$type' => 'wall-comment',
- '$id' => $link_item['id'],
- '$parent' => $link_item['id'],
- '$profile_uid' => $owner_uid,
- '$mylink' => $contact['url'],
- '$mytitle' => t('This is you'),
- '$myphoto' => $contact['thumb'],
- '$comment' => t('Comment'),
- '$submit' => t('Submit'),
- '$preview' => t('Preview'),
- '$ww' => ''
- ));
- }
+ $comments .= replace_macros($cmnt_tpl,array(
+ '$return_path' => '',
+ '$jsreload' => $return_url,
+ '$type' => 'wall-comment',
+ '$id' => $link_item['id'],
+ '$parent' => $link_item['id'],
+ '$profile_uid' => $owner_uid,
+ '$mylink' => $contact['url'],
+ '$mytitle' => t('This is you'),
+ '$myphoto' => $contact['thumb'],
+ '$comment' => t('Comment'),
+ '$submit' => t('Submit'),
+ '$preview' => t('Preview'),
+ '$ww' => ''
+ ));
}
}
@@ -1374,25 +1369,22 @@ function photos_content(&$a) {
if($can_post || can_write_wall($a,$owner_uid)) {
- if($link_item['last-child']) {
- $comments .= replace_macros($cmnt_tpl,array(
- '$return_path' => '',
- '$jsreload' => $return_url,
- '$type' => 'wall-comment',
- '$id' => $link_item['id'],
- '$parent' => $link_item['id'],
- '$profile_uid' => $owner_uid,
- '$mylink' => $contact['url'],
- '$mytitle' => t('This is you'),
- '$myphoto' => $contact['thumb'],
- '$comment' => t('Comment'),
- '$submit' => t('Submit'),
- '$ww' => ''
- ));
- }
+ $comments .= replace_macros($cmnt_tpl,array(
+ '$return_path' => '',
+ '$jsreload' => $return_url,
+ '$type' => 'wall-comment',
+ '$id' => $link_item['id'],
+ '$parent' => $link_item['id'],
+ '$profile_uid' => $owner_uid,
+ '$mylink' => $contact['url'],
+ '$mytitle' => t('This is you'),
+ '$myphoto' => $contact['thumb'],
+ '$comment' => t('Comment'),
+ '$submit' => t('Submit'),
+ '$ww' => ''
+ ));
}
-
foreach($r as $item) {
$comment = '';
$template = $tpl;
@@ -1404,23 +1396,20 @@ function photos_content(&$a) {
$redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ;
if($can_post || can_write_wall($a,$owner_uid)) {
-
- if($item['last-child']) {
- $comments .= replace_macros($cmnt_tpl,array(
- '$return_path' => '',
- '$jsreload' => $return_url,
- '$type' => 'wall-comment',
- '$id' => $item['item_id'],
- '$parent' => $item['parent'],
- '$profile_uid' => $owner_uid,
- '$mylink' => $contact['url'],
- '$mytitle' => t('This is you'),
- '$myphoto' => $contact['thumb'],
- '$comment' => t('Comment'),
- '$submit' => t('Submit'),
- '$ww' => ''
- ));
- }
+ $comments .= replace_macros($cmnt_tpl,array(
+ '$return_path' => '',
+ '$jsreload' => $return_url,
+ '$type' => 'wall-comment',
+ '$id' => $item['item_id'],
+ '$parent' => $item['parent'],
+ '$profile_uid' => $owner_uid,
+ '$mylink' => $contact['url'],
+ '$mytitle' => t('This is you'),
+ '$myphoto' => $contact['thumb'],
+ '$comment' => t('Comment'),
+ '$submit' => t('Submit'),
+ '$ww' => ''
+ ));
}