mirror of
https://github.com/friendica/friendica
synced 2024-11-10 05:42:54 +00:00
merged 2 if() into one three times
Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
parent
de5125a4c7
commit
192f6d7cf4
1 changed files with 54 additions and 63 deletions
|
@ -1628,9 +1628,7 @@ 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']) {
|
||||
if (($can_post || can_write_wall($a,$owner_uid)) && $link_item['last-child']) {
|
||||
$comments .= replace_macros($cmnt_tpl,array(
|
||||
'$return_path' => '',
|
||||
'$jsreload' => $return_url,
|
||||
|
@ -1650,7 +1648,6 @@ function photos_content(App $a) {
|
|||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$alike = array();
|
||||
$dlike = array();
|
||||
|
@ -1673,9 +1670,7 @@ 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']) {
|
||||
if (($can_post || can_write_wall($a, $owner_uid)) && $link_item['last-child']) {
|
||||
$comments .= replace_macros($cmnt_tpl,array(
|
||||
'$return_path' => '',
|
||||
'$jsreload' => $return_url,
|
||||
|
@ -1694,7 +1689,6 @@ function photos_content(App $a) {
|
|||
'$rand_num' => random_digits(12)
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach ($r as $item) {
|
||||
|
@ -1756,9 +1750,7 @@ 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']) {
|
||||
if (($can_post || can_write_wall($a, $owner_uid)) && $item['last-child']) {
|
||||
$comments .= replace_macros($cmnt_tpl, array(
|
||||
'$return_path' => '',
|
||||
'$jsreload' => $return_url,
|
||||
|
@ -1779,7 +1771,6 @@ function photos_content(App $a) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$paginate = paginate($a);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue