aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2012-05-22 08:46:02 +0200
committerzottel <github@zottel.net>2012-05-22 08:46:02 +0200
commite9c86c0fd0fb87b49e60669e6d4be810ca426ec4 (patch)
treecfee80cc9122974a4304591aa7d54ca5fc8a71ea /mod/item.php
parent2cd3ec7b983327f8c162845d0f4b8d9753f30e27 (diff)
parent02502c3a7460a1af3414b65232fd7c672a76d941 (diff)
downloadvolse-hubzilla-e9c86c0fd0fb87b49e60669e6d4be810ca426ec4.tar.gz
volse-hubzilla-e9c86c0fd0fb87b49e60669e6d4be810ca426ec4.tar.bz2
volse-hubzilla-e9c86c0fd0fb87b49e60669e6d4be810ca426ec4.zip
Merge remote branch 'upstream/master'
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') {