Coding convention applied:
- added curly braces - added space between if/foreach and brace - avoided 2 return statements (true/false) by replacing them with just one - added TODO for applying above to all findings Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
2325d81048
commit
9c81b4948e
1 changed files with 19 additions and 18 deletions
|
@ -1257,8 +1257,9 @@ function tag_deliver($uid,$item_id) {
|
|||
$c = q("select name, url, thumb from contact where self = 1 and uid = %d limit 1",
|
||||
intval($u[0]['uid'])
|
||||
);
|
||||
if (! count($c))
|
||||
if (! count($c)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// also reset all the privacy bits to the forum default permissions
|
||||
|
||||
|
@ -1266,8 +1267,8 @@ function tag_deliver($uid,$item_id) {
|
|||
|
||||
$forum_mode = (($prvgroup) ? 2 : 1);
|
||||
|
||||
q("update item set wall = 1, origin = 1, forum_mode = %d, `owner-name` = '%s', `owner-link` = '%s', `owner-avatar` = '%s',
|
||||
`private` = %d, `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s' where id = %d",
|
||||
q("UPDATE `item` SET `wall` = 1, `origin` = 1, `forum_mode` = %d, `owner-name` = '%s', `owner-link` = '%s', `owner-avatar` = '%s',
|
||||
`private` = %d, `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s' WHERE `id` = %d",
|
||||
intval($forum_mode),
|
||||
dbesc($c[0]['name']),
|
||||
dbesc($c[0]['url']),
|
||||
|
@ -1326,13 +1327,12 @@ function tgroup_check($uid,$item) {
|
|||
}
|
||||
}
|
||||
|
||||
if (! $mention)
|
||||
if (! $mention) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((! $community_page) && (! $prvgroup))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
/// @TODO Combines both return statements into one
|
||||
return (($community_page) || ($prvgroup));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1350,6 +1350,7 @@ function edited_timestamp_is_newer($existing, $update) {
|
|||
if (!x($update,'edited') || !$update['edited']) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$existing_edited = datetime_convert('UTC', 'UTC', $existing['edited']);
|
||||
$update_edited = datetime_convert('UTC', 'UTC', $update['edited']);
|
||||
return (strcmp($existing_edited, $update_edited) < 0);
|
||||
|
|
Loading…
Reference in a new issue