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
|
@ -166,7 +166,7 @@ function item_post(App $a) {
|
|||
|
||||
// Now check that valid personal details have been provided
|
||||
if (!Security::canWriteToUserWall($profile_uid) && !$allow_comment) {
|
||||
notice(L10n::t('Permission denied.') . EOL) ;
|
||||
notice(L10n::t('Permission denied.') . EOL);
|
||||
|
||||
if (!empty($_REQUEST['return'])) {
|
||||
$a->internalRedirect($return_path);
|
||||
|
@ -690,7 +690,7 @@ function item_post(App $a) {
|
|||
}
|
||||
|
||||
$json = ['cancel' => 1];
|
||||
if (!empty($_REQUEST['jsreload']) && strlen($_REQUEST['jsreload'])) {
|
||||
if (!empty($_REQUEST['jsreload'])) {
|
||||
$json['reload'] = System::baseUrl() . '/' . $_REQUEST['jsreload'];
|
||||
}
|
||||
|
||||
|
@ -869,7 +869,7 @@ function item_post_return($baseurl, $api_source, $return_path)
|
|||
}
|
||||
|
||||
$json = ['success' => 1];
|
||||
if (!empty($_REQUEST['jsreload']) && strlen($_REQUEST['jsreload'])) {
|
||||
if (!empty($_REQUEST['jsreload'])) {
|
||||
$json['reload'] = $baseurl . '/' . $_REQUEST['jsreload'];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue