mirror of
https://github.com/friendica/friendica
synced 2025-04-25 15:50:10 +00:00
Continued:
- avoided else() block which reduces code complexibility - used more x() - added curly braces - added known type-hints Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
e0a07d5f27
commit
57e668d9e0
8 changed files with 48 additions and 38 deletions
|
@ -63,17 +63,19 @@ function subthread_content(App $a) {
|
|||
WHERE `contact`.`self` = 1 AND `contact`.`uid` = %d LIMIT 1",
|
||||
intval($owner_uid)
|
||||
);
|
||||
if (DBM::is_result($r))
|
||||
|
||||
if (DBM::is_result($r)) {
|
||||
$owner = $r[0];
|
||||
}
|
||||
|
||||
if (! $owner) {
|
||||
logger('like: no owner');
|
||||
return;
|
||||
}
|
||||
|
||||
if (! $remote_owner)
|
||||
if (! $remote_owner) {
|
||||
$remote_owner = $owner;
|
||||
|
||||
}
|
||||
|
||||
$contact = null;
|
||||
// This represents the person posting
|
||||
|
@ -85,8 +87,10 @@ function subthread_content(App $a) {
|
|||
intval($_SESSION['visitor_id']),
|
||||
intval($owner_uid)
|
||||
);
|
||||
if (DBM::is_result($r))
|
||||
|
||||
if (DBM::is_result($r)) {
|
||||
$contact = $r[0];
|
||||
}
|
||||
}
|
||||
if (! $contact) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue