diff options
author | friendica <info@friendica.com> | 2012-09-09 21:17:06 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-09-09 21:17:06 -0700 |
commit | 3ebb4a3dc7a369e7a716ab93d02b44b20522080f (patch) | |
tree | 5b8daecf7a29c6fe2f0c8572204d9e2bd1713a50 /mod/item.php | |
parent | a08666be142c484134c2f10cf0c460c8a3c07682 (diff) | |
download | volse-hubzilla-3ebb4a3dc7a369e7a716ab93d02b44b20522080f.tar.gz volse-hubzilla-3ebb4a3dc7a369e7a716ab93d02b44b20522080f.tar.bz2 volse-hubzilla-3ebb4a3dc7a369e7a716ab93d02b44b20522080f.zip |
updates
Diffstat (limited to 'mod/item.php')
-rw-r--r-- | mod/item.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/mod/item.php b/mod/item.php index c7de5f304..12765cba3 100644 --- a/mod/item.php +++ b/mod/item.php @@ -280,6 +280,7 @@ function item_post(&$a) { $author = null; $self = false; + $contact_id = 0; if((local_user()) && (local_user() == $profile_uid)) { $self = true; @@ -288,9 +289,19 @@ function item_post(&$a) { ); } elseif(remote_user()) { - $r = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1", - intval(remote_user()) - ); + if(is_array($_SESSION['remote'])) { + foreach($_SESSION['remote'] as $v) { + if($v['uid'] == $profile_uid) { + $contact_id = $v['cid']; + break; + } + } + } + if($contact_id) { + $r = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1", + intval($contact_id) + ); + } } if(count($r)) { |