added spaces + used x ()

Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2017-04-01 21:46:57 +02:00
parent 60552260e1
commit 3cea176ef2
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
2 changed files with 5 additions and 4 deletions

View file

@ -327,6 +327,7 @@ function item_post(App $a) {
if ($api_source && $profile_uid && $profile_uid == local_user() && (! $private)) {
$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'];