Replace x() by isset(), !empty() or defaults()
- Remove extraneous parentheses around empty() calls - Remove duplicate calls to intval(), count() or strlen() after empty() - Replace ternary operators outputting binary value with empty() return value - Rewrite defaults() without x()
This commit is contained in:
parent
ea4e772b1e
commit
458981f75c
101 changed files with 896 additions and 914 deletions
|
@ -54,7 +54,7 @@ function poke_init(App $a)
|
|||
return;
|
||||
}
|
||||
|
||||
$parent = (x($_GET,'parent') ? intval($_GET['parent']) : 0);
|
||||
$parent = (!empty($_GET['parent']) ? intval($_GET['parent']) : 0);
|
||||
|
||||
|
||||
Logger::log('poke: verb ' . $verb . ' contact ' . $contact_id, Logger::DEBUG);
|
||||
|
@ -86,7 +86,7 @@ function poke_init(App $a)
|
|||
$deny_gid = $item['deny_gid'];
|
||||
}
|
||||
} else {
|
||||
$private = (x($_GET,'private') ? intval($_GET['private']) : 0);
|
||||
$private = (!empty($_GET['private']) ? intval($_GET['private']) : 0);
|
||||
|
||||
$allow_cid = ($private ? '<' . $target['id']. '>' : $a->user['allow_cid']);
|
||||
$allow_gid = ($private ? '' : $a->user['allow_gid']);
|
||||
|
@ -169,7 +169,7 @@ function poke_content(App $a)
|
|||
]);
|
||||
|
||||
|
||||
$parent = (x($_GET,'parent') ? intval($_GET['parent']) : '0');
|
||||
$parent = (!empty($_GET['parent']) ? intval($_GET['parent']) : '0');
|
||||
|
||||
|
||||
$verbs = L10n::getPokeVerbs();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue