Merge pull request #6219 from MrPetovan/task/remove-x

Remove x()
This commit is contained in:
Michael Vogel 2018-12-01 23:40:51 +01:00 committed by GitHub
commit 5a3991d4f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
101 changed files with 895 additions and 949 deletions

View file

@ -277,7 +277,7 @@ function display_content(App $a, $update = false, $update_uid = 0)
$contact_id = 0;
if (x($_SESSION, 'remote') && is_array($_SESSION['remote'])) {
if (!empty($_SESSION['remote']) && is_array($_SESSION['remote'])) {
foreach ($_SESSION['remote'] as $v) {
if ($v['uid'] == $a->profile['uid']) {
$contact_id = $v['cid'];
@ -308,7 +308,7 @@ function display_content(App $a, $update = false, $update_uid = 0)
}
$is_owner = (local_user() && (in_array($a->profile['profile_uid'], [local_user(), 0])) ? true : false);
if (x($a->profile, 'hidewall') && !$is_owner && !$is_remote_contact) {
if (!empty($a->profile['hidewall']) && !$is_owner && !$is_remote_contact) {
notice(L10n::t('Access to this profile has been restricted.') . EOL);
return;
}