aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-04-19 20:02:55 -0700
committerredmatrix <git@macgirvin.com>2016-04-19 20:02:55 -0700
commit1e8b3fe74917861309eb48674ce95f91ccaf9d1d (patch)
tree71de1890599a07f7528e391e1ca2ab27eea735b2
parent8a57b845ae936230c83a6f3afb0ee3d23ee4dcda (diff)
downloadvolse-hubzilla-1e8b3fe74917861309eb48674ce95f91ccaf9d1d.tar.gz
volse-hubzilla-1e8b3fe74917861309eb48674ce95f91ccaf9d1d.tar.bz2
volse-hubzilla-1e8b3fe74917861309eb48674ce95f91ccaf9d1d.zip
Revert the last edit on this file. Need to work this through a bit more before changing this bit.
-rw-r--r--Zotlabs/Module/Item.php32
1 files changed, 17 insertions, 15 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index 02e3c48b4..58660a839 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -748,7 +748,10 @@ class Item extends \Zotlabs\Web\Controller {
$plink = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . $mid;
}
-
+
+
+
+
$datarray['aid'] = $channel['channel_account_id'];
$datarray['uid'] = $profile_uid;
@@ -968,20 +971,6 @@ class Item extends \Zotlabs\Web\Controller {
intval($parent_item['id'])
);
}
-
- // send a sync packet to any channel clones
-
- $r = q("select * from item where id = %d",
- intval($post_id)
- );
- if($r) {
- xchan_query($r);
- $sync_item = fetch_post_tags($r);
- $rid = q("select * from item_id where iid = %d",
- intval($post_id)
- );
- build_sync_packet($uid,array('item' => array(encode_item($sync_item[0],true)),'item_id' => $rid));
- }
}
else {
logger('mod_item: unable to retrieve post that was just stored.');
@@ -999,6 +988,19 @@ class Item extends \Zotlabs\Web\Controller {
$ditem['author'] = $observer;
store_diaspora_comment_sig($ditem,$channel,$parent_item, $post_id, (($walltowall_comment) ? 1 : 0));
}
+ else {
+ $r = q("select * from item where id = %d",
+ intval($post_id)
+ );
+ if($r) {
+ xchan_query($r);
+ $sync_item = fetch_post_tags($r);
+ $rid = q("select * from item_id where iid = %d",
+ intval($post_id)
+ );
+ build_sync_packet($uid,array('item' => array(encode_item($sync_item[0],true)),'item_id' => $rid));
+ }
+ }
$datarray['id'] = $post_id;
$datarray['llink'] = z_root() . '/display/' . $channel['channel_address'] . '/' . $post_id;