aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorTobias Diekershoff <tobias.diekershoff@gmx.net>2012-05-22 11:57:19 +0200
committerTobias Diekershoff <tobias.diekershoff@gmx.net>2012-05-22 11:57:19 +0200
commit30f3a16874fd32b55dfbe079afe2470f7ce86e2e (patch)
tree28af502ed89d812d6130669716726b2fb892e5d0 /mod/item.php
parent5dad99888d4d67fd10e777b074a77f01f65018aa (diff)
parent02502c3a7460a1af3414b65232fd7c672a76d941 (diff)
downloadvolse-hubzilla-30f3a16874fd32b55dfbe079afe2470f7ce86e2e.tar.gz
volse-hubzilla-30f3a16874fd32b55dfbe079afe2470f7ce86e2e.tar.bz2
volse-hubzilla-30f3a16874fd32b55dfbe079afe2470f7ce86e2e.zip
Merge branch 'master' of https://github.com/friendica/friendica
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php16
1 files changed, 6 insertions, 10 deletions
diff --git a/mod/item.php b/mod/item.php
index 9f6b2aef4..81dd553cd 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -290,18 +290,16 @@ function item_post(&$a) {
$author = null;
$self = false;
- if(($_SESSION['uid']) && ($_SESSION['uid'] == $profile_uid)) {
+ if((local_user()) && (local_user() == $profile_uid)) {
$self = true;
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1",
intval($_SESSION['uid'])
);
}
- else {
- if((x($_SESSION,'visitor_id')) && (intval($_SESSION['visitor_id']))) {
- $r = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1",
- intval($_SESSION['visitor_id'])
- );
- }
+ elseif(remote_user()) {
+ $r = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1",
+ intval(remote_user())
+ );
}
if(count($r)) {
@@ -311,7 +309,7 @@ function item_post(&$a) {
// get contact info for owner
- if($profile_uid == $_SESSION['uid']) {
+ if($profile_uid == local_user()) {
$contact_record = $author;
}
else {
@@ -322,8 +320,6 @@ function item_post(&$a) {
$contact_record = $r[0];
}
-
-
$post_type = notags(trim($_REQUEST['type']));
if($post_type === 'net-comment') {