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
|
@ -20,8 +20,8 @@ function wallmessage_post(App $a) {
|
|||
return;
|
||||
}
|
||||
|
||||
$subject = ((x($_REQUEST,'subject')) ? Strings::escapeTags(trim($_REQUEST['subject'])) : '');
|
||||
$body = ((x($_REQUEST,'body')) ? Strings::escapeHtml(trim($_REQUEST['body'])) : '');
|
||||
$subject = (!empty($_REQUEST['subject']) ? Strings::escapeTags(trim($_REQUEST['subject'])) : '');
|
||||
$body = (!empty($_REQUEST['body']) ? Strings::escapeHtml(trim($_REQUEST['body'])) : '');
|
||||
|
||||
$recipient = (($a->argc > 1) ? Strings::escapeTags($a->argv[1]) : '');
|
||||
if ((! $recipient) || (! $body)) {
|
||||
|
@ -131,8 +131,8 @@ function wallmessage_content(App $a) {
|
|||
'$subject' => L10n::t('Subject:'),
|
||||
'$recipname' => $user['username'],
|
||||
'$nickname' => $user['nickname'],
|
||||
'$subjtxt' => ((x($_REQUEST, 'subject')) ? strip_tags($_REQUEST['subject']) : ''),
|
||||
'$text' => ((x($_REQUEST, 'body')) ? Strings::escapeHtml(htmlspecialchars($_REQUEST['body'])) : ''),
|
||||
'$subjtxt' => (!empty($_REQUEST['subject']) ? strip_tags($_REQUEST['subject']) : ''),
|
||||
'$text' => (!empty($_REQUEST['body']) ? Strings::escapeHtml(htmlspecialchars($_REQUEST['body'])) : ''),
|
||||
'$readonly' => '',
|
||||
'$yourmessage' => L10n::t('Your message:'),
|
||||
'$parent' => '',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue