aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-03-22 20:30:23 -0700
committerfriendica <info@friendica.com>2015-03-22 20:30:23 -0700
commit62b2fa6ac7ee85c8572eb868eb30dc2e20cf3040 (patch)
tree629021d00233ee55571cd9071ec00c319186b885 /mod/item.php
parentccef9e5636dadeb37cabd70d4a8aece650e70e1f (diff)
downloadvolse-hubzilla-62b2fa6ac7ee85c8572eb868eb30dc2e20cf3040.tar.gz
volse-hubzilla-62b2fa6ac7ee85c8572eb868eb30dc2e20cf3040.tar.bz2
volse-hubzilla-62b2fa6ac7ee85c8572eb868eb30dc2e20cf3040.zip
operation snakebite, cont.
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php27
1 files changed, 20 insertions, 7 deletions
diff --git a/mod/item.php b/mod/item.php
index dad883f50..6644be291 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -35,6 +35,23 @@ function item_post(&$a) {
$channel = null;
$observer = null;
+
+ /**
+ * Is this a reply to something?
+ */
+
+ $parent = ((x($_REQUEST,'parent')) ? intval($_REQUEST['parent']) : 0);
+ $parent_mid = ((x($_REQUEST,'parent_mid')) ? trim($_REQUEST['parent_mid']) : '');
+
+ $remote_xchan = ((x($_REQUEST,'remote_xchan')) ? trim($_REQUEST['remote_xchan']) : false);
+ $r = q("select * from xchan where xchan_hash = '%s' limit 1",
+ dbesc($remote_xchan)
+ );
+ if($r)
+ $remote_observer = $r[0];
+ else
+ $remote_xchan = $remote_observer = false;
+
$profile_uid = ((x($_REQUEST,'profile_uid')) ? intval($_REQUEST['profile_uid']) : 0);
require_once('include/identity.php');
$sys = get_sys_channel();
@@ -116,13 +133,6 @@ function item_post(&$a) {
$item_flags = $item_restrict = 0;
- /**
- * Is this a reply to something?
- */
-
- $parent = ((x($_REQUEST,'parent')) ? intval($_REQUEST['parent']) : 0);
- $parent_mid = ((x($_REQUEST,'parent_mid')) ? trim($_REQUEST['parent_mid']) : '');
-
$route = '';
$parent_item = null;
$parent_contact = null;
@@ -275,6 +285,9 @@ function item_post(&$a) {
$walltowall = false;
$walltowall_comment = false;
+ if($remote_xchan)
+ $observer = $remote_observer;
+
if($observer) {
logger('mod_item: post accepted from ' . $observer['xchan_name'] . ' for ' . $owner_xchan['xchan_name'], LOGGER_DEBUG);