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 = '';
|
$comments = '';
|
||||||
if (! dbm::is_result($r)) {
|
if (! dbm::is_result($r)) {
|
||||||
/// @TODO merge into one if() ?
|
if (($can_post || can_write_wall($a,$owner_uid)) && $link_item['last-child']) {
|
||||||
if ($can_post || can_write_wall($a,$owner_uid)) {
|
$comments .= replace_macros($cmnt_tpl,array(
|
||||||
if ($link_item['last-child']) {
|
'$return_path' => '',
|
||||||
$comments .= replace_macros($cmnt_tpl,array(
|
'$jsreload' => $return_url,
|
||||||
'$return_path' => '',
|
'$type' => 'wall-comment',
|
||||||
'$jsreload' => $return_url,
|
'$id' => $link_item['id'],
|
||||||
'$type' => 'wall-comment',
|
'$parent' => $link_item['id'],
|
||||||
'$id' => $link_item['id'],
|
'$profile_uid' => $owner_uid,
|
||||||
'$parent' => $link_item['id'],
|
'$mylink' => $contact['url'],
|
||||||
'$profile_uid' => $owner_uid,
|
'$mytitle' => t('This is you'),
|
||||||
'$mylink' => $contact['url'],
|
'$myphoto' => $contact['thumb'],
|
||||||
'$mytitle' => t('This is you'),
|
'$comment' => t('Comment'),
|
||||||
'$myphoto' => $contact['thumb'],
|
'$submit' => t('Submit'),
|
||||||
'$comment' => t('Comment'),
|
'$preview' => t('Preview'),
|
||||||
'$submit' => t('Submit'),
|
'$sourceapp' => t($a->sourcename),
|
||||||
'$preview' => t('Preview'),
|
'$ww' => '',
|
||||||
'$sourceapp' => t($a->sourcename),
|
'$rand_num' => random_digits(12)
|
||||||
'$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']) : '');
|
$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']) : '');
|
$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)) && $link_item['last-child']) {
|
||||||
if ($can_post || can_write_wall($a,$owner_uid)) {
|
$comments .= replace_macros($cmnt_tpl,array(
|
||||||
if ($link_item['last-child']) {
|
'$return_path' => '',
|
||||||
$comments .= replace_macros($cmnt_tpl,array(
|
'$jsreload' => $return_url,
|
||||||
'$return_path' => '',
|
'$type' => 'wall-comment',
|
||||||
'$jsreload' => $return_url,
|
'$id' => $link_item['id'],
|
||||||
'$type' => 'wall-comment',
|
'$parent' => $link_item['id'],
|
||||||
'$id' => $link_item['id'],
|
'$profile_uid' => $owner_uid,
|
||||||
'$parent' => $link_item['id'],
|
'$mylink' => $contact['url'],
|
||||||
'$profile_uid' => $owner_uid,
|
'$mytitle' => t('This is you'),
|
||||||
'$mylink' => $contact['url'],
|
'$myphoto' => $contact['thumb'],
|
||||||
'$mytitle' => t('This is you'),
|
'$comment' => t('Comment'),
|
||||||
'$myphoto' => $contact['thumb'],
|
'$submit' => t('Submit'),
|
||||||
'$comment' => t('Comment'),
|
'$preview' => t('Preview'),
|
||||||
'$submit' => t('Submit'),
|
'$sourceapp' => t($a->sourcename),
|
||||||
'$preview' => t('Preview'),
|
'$ww' => '',
|
||||||
'$sourceapp' => t($a->sourcename),
|
'$rand_num' => random_digits(12)
|
||||||
'$ww' => '',
|
));
|
||||||
'$rand_num' => random_digits(12)
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1756,27 +1750,24 @@ function photos_content(App $a) {
|
||||||
'$comment' => $comment
|
'$comment' => $comment
|
||||||
));
|
));
|
||||||
|
|
||||||
/// @TODO merge into one if() ?
|
if (($can_post || can_write_wall($a, $owner_uid)) && $item['last-child']) {
|
||||||
if ($can_post || can_write_wall($a, $owner_uid)) {
|
$comments .= replace_macros($cmnt_tpl, array(
|
||||||
if ($item['last-child']) {
|
'$return_path' => '',
|
||||||
$comments .= replace_macros($cmnt_tpl, array(
|
'$jsreload' => $return_url,
|
||||||
'$return_path' => '',
|
'$type' => 'wall-comment',
|
||||||
'$jsreload' => $return_url,
|
'$id' => $item['item_id'],
|
||||||
'$type' => 'wall-comment',
|
'$parent' => $item['parent'],
|
||||||
'$id' => $item['item_id'],
|
'$profile_uid' => $owner_uid,
|
||||||
'$parent' => $item['parent'],
|
'$mylink' => $contact['url'],
|
||||||
'$profile_uid' => $owner_uid,
|
'$mytitle' => t('This is you'),
|
||||||
'$mylink' => $contact['url'],
|
'$myphoto' => $contact['thumb'],
|
||||||
'$mytitle' => t('This is you'),
|
'$comment' => t('Comment'),
|
||||||
'$myphoto' => $contact['thumb'],
|
'$submit' => t('Submit'),
|
||||||
'$comment' => t('Comment'),
|
'$preview' => t('Preview'),
|
||||||
'$submit' => t('Submit'),
|
'$sourceapp' => t($a->sourcename),
|
||||||
'$preview' => t('Preview'),
|
'$ww' => '',
|
||||||
'$sourceapp' => t($a->sourcename),
|
'$rand_num' => random_digits(12)
|
||||||
'$ww' => '',
|
));
|
||||||
'$rand_num' => random_digits(12)
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user