From: Roland Haeder Date: Sat, 1 Apr 2017 19:46:57 +0000 (+0200) Subject: added spaces + used x () X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3cea176ef238c8d30b0fd74ca86bb73bb00d8bc5;p=friendica.git added spaces + used x () Signed-off-by: Roland Haeder --- diff --git a/boot.php b/boot.php index f65829ed18..5f65572d50 100644 --- a/boot.php +++ b/boot.php @@ -1450,7 +1450,7 @@ function get_app() { */ function x($s,$k = NULL) { if ($k != NULL) { - if ((is_array($s)) && (array_key_exists($k,$s))) { + if ((is_array($s)) && (array_key_exists($k, $s))) { if ($s[$k]) { return (int) 1; } diff --git a/mod/item.php b/mod/item.php index 79633cdc18..8bf922d97c 100644 --- a/mod/item.php +++ b/mod/item.php @@ -325,8 +325,9 @@ function item_post(App $a) { // if using the API, we won't see pubmail_enable - figure out if it should be set if ($api_source && $profile_uid && $profile_uid == local_user() && (! $private)) { - $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1); + $mail_disabled = ((function_exists('imap_open') && (! get_config('system', 'imap_disabled'))) ? 0 : 1); if (! $mail_disabled) { + /// @TODO Check if only pubmail is loaded, * loads all columns $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d AND `server` != '' LIMIT 1", intval(local_user()) ); @@ -372,7 +373,7 @@ function item_post(App $a) { $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1", intval($_SESSION['uid'])); } elseif(remote_user()) { - if (is_array($_SESSION['remote'])) { + if (x($_SESSION, 'remote') && is_array($_SESSION['remote'])) { foreach ($_SESSION['remote'] as $v) { if ($v['uid'] == $profile_uid) { $contact_id = $v['cid']; @@ -544,7 +545,7 @@ function item_post(App $a) { if ($parent AND ($parent_contact['network'] == NETWORK_OSTATUS)) { $contact = '@[url=' . $parent_contact['url'] . ']' . $parent_contact['nick'] . '[/url]'; - if (!in_array($contact,$tags)) { + if (!in_array($contact, $tags)) { $body = $contact . ' ' . $body; $tags[] = $contact; }