mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 03:25:15 +02:00
Continued with coding convention:
- added curly braces around conditional code blocks - added space between if/foreach/... and brace - made some SQL keywords upper-cased and added back-ticks to columns/table names Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
parent
04d90d9780
commit
536f078ed4
9 changed files with 78 additions and 56 deletions
|
@ -44,8 +44,9 @@ function subthread_content(App &$a) {
|
|||
if (! dbm::is_result($r)) {
|
||||
return;
|
||||
}
|
||||
if(! $r[0]['self'])
|
||||
if (! $r[0]['self']) {
|
||||
$remote_owner = $r[0];
|
||||
}
|
||||
}
|
||||
|
||||
// this represents the post owner on this system.
|
||||
|
@ -57,18 +58,18 @@ function subthread_content(App &$a) {
|
|||
if (dbm::is_result($r))
|
||||
$owner = $r[0];
|
||||
|
||||
if(! $owner) {
|
||||
if (! $owner) {
|
||||
logger('like: no owner');
|
||||
return;
|
||||
}
|
||||
|
||||
if(! $remote_owner)
|
||||
if (! $remote_owner)
|
||||
$remote_owner = $owner;
|
||||
|
||||
|
||||
// This represents the person posting
|
||||
|
||||
if((local_user()) && (local_user() == $owner_uid)) {
|
||||
if ((local_user()) && (local_user() == $owner_uid)) {
|
||||
$contact = $owner;
|
||||
}
|
||||
else {
|
||||
|
@ -79,7 +80,7 @@ function subthread_content(App &$a) {
|
|||
if (dbm::is_result($r))
|
||||
$contact = $r[0];
|
||||
}
|
||||
if(! $contact) {
|
||||
if (! $contact) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -103,8 +104,9 @@ function subthread_content(App &$a) {
|
|||
EOT;
|
||||
$bodyverb = t('%1$s is following %2$s\'s %3$s');
|
||||
|
||||
if(! isset($bodyverb))
|
||||
return;
|
||||
if (! isset($bodyverb)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$arr = array();
|
||||
|
||||
|
@ -144,7 +146,7 @@ EOT;
|
|||
|
||||
$post_id = item_store($arr);
|
||||
|
||||
if(! $item['visible']) {
|
||||
if (! $item['visible']) {
|
||||
$r = q("UPDATE `item` SET `visible` = 1 WHERE `id` = %d AND `uid` = %d",
|
||||
intval($item['id']),
|
||||
intval($owner_uid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue