merged 2 if() into one three times
Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
parent
de5125a4c7
commit
192f6d7cf4
117
mod/photos.php
117
mod/photos.php
|
@ -1628,27 +1628,24 @@ function photos_content(App $a) {
|
|||
|
||||
$comments = '';
|
||||
if (! dbm::is_result($r)) {
|
||||
/// @TODO merge into one if() ?
|
||||
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'),
|
||||
'$sourceapp' => t($a->sourcename),
|
||||
'$ww' => '',
|
||||
'$rand_num' => random_digits(12)
|
||||
));
|
||||
}
|
||||
if (($can_post || can_write_wall($a,$owner_uid)) && $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'),
|
||||
'$sourceapp' => t($a->sourcename),
|
||||
'$ww' => '',
|
||||
'$rand_num' => random_digits(12)
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1673,27 +1670,24 @@ function photos_content(App $a) {
|
|||
$like = ((x($conv_responses['like'],$link_item['uri'])) ? format_like($conv_responses['like'][$link_item['uri']],$conv_responses['like'][$link_item['uri'] . '-l'], 'like',$link_item['id']) : '');
|
||||
$dislike = ((x($conv_responses['dislike'],$link_item['uri'])) ? format_like($conv_responses['dislike'][$link_item['uri']],$conv_responses['dislike'][$link_item['uri'] . '-l'], 'dislike',$link_item['id']) : '');
|
||||
|
||||
/// @TODO merge into one if() ?
|
||||
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'),
|
||||
'$sourceapp' => t($a->sourcename),
|
||||
'$ww' => '',
|
||||
'$rand_num' => random_digits(12)
|
||||
));
|
||||
}
|
||||
if (($can_post || can_write_wall($a, $owner_uid)) && $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'),
|
||||
'$sourceapp' => t($a->sourcename),
|
||||
'$ww' => '',
|
||||
'$rand_num' => random_digits(12)
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1756,27 +1750,24 @@ function photos_content(App $a) {
|
|||
'$comment' => $comment
|
||||
));
|
||||
|
||||
/// @TODO merge into one if() ?
|
||||
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'),
|
||||
'$preview' => t('Preview'),
|
||||
'$sourceapp' => t($a->sourcename),
|
||||
'$ww' => '',
|
||||
'$rand_num' => random_digits(12)
|
||||
));
|
||||
}
|
||||
if (($can_post || can_write_wall($a, $owner_uid)) && $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'),
|
||||
'$preview' => t('Preview'),
|
||||
'$sourceapp' => t($a->sourcename),
|
||||
'$ww' => '',
|
||||
'$rand_num' => random_digits(12)
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue