diff options
author | friendica <info@friendica.com> | 2012-10-25 18:42:42 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-10-25 18:42:42 -0700 |
commit | 3b394ea43fd3bc011f98a9160a8b408283f97ebc (patch) | |
tree | da7fe5fc9089752af8467937355991b45c345776 /mod/item.php | |
parent | ebb75340ec1b152eab0319f5811711ad192a2802 (diff) | |
download | volse-hubzilla-3b394ea43fd3bc011f98a9160a8b408283f97ebc.tar.gz volse-hubzilla-3b394ea43fd3bc011f98a9160a8b408283f97ebc.tar.bz2 volse-hubzilla-3b394ea43fd3bc011f98a9160a8b408283f97ebc.zip |
comments sort of working again but now need to fix the threading which was ported when it was only half working
Diffstat (limited to 'mod/item.php')
-rw-r--r-- | mod/item.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mod/item.php b/mod/item.php index 181984d33..98541b570 100644 --- a/mod/item.php +++ b/mod/item.php @@ -564,7 +564,9 @@ function item_post(&$a) { $notify_type = (($parent) ? 'comment-new' : 'wall-new' ); $uri = item_message_id(); - + $parent_uri = $uri; + if($parent_item) + $parent_uri = $parent_item['uri']; // Fallback so that we alway have a thr_parent @@ -589,6 +591,7 @@ function item_post(&$a) { $datarray['received'] = datetime_convert(); $datarray['changed'] = datetime_convert(); $datarray['uri'] = $uri; + $datarray['parent_uri'] = $parent_uri; $datarray['title'] = $title; $datarray['body'] = $body; $datarray['app'] = $app; @@ -774,11 +777,10 @@ function item_post(&$a) { if(! $parent) $parent = $post_id; - $r = q("UPDATE `item` SET `parent` = %d, `parent_uri` = '%s', `plink` = '%s', `changed` = '%s', `visible` = 1 + $r = q("UPDATE `item` SET `parent` = %d, `parent_uri` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1", intval($parent), dbesc(($parent == $post_id) ? $uri : $parent_item['uri']), - dbesc($a->get_baseurl() . '/display/' . $channel['channel_address'] . '/' . $post_id), dbesc(datetime_convert()), intval($post_id) ); @@ -787,7 +789,9 @@ function item_post(&$a) { // This way we don't see every picture in your new photo album posted to your wall at once. // They will show up as people comment on them. - if(! $parent_item['item_restrict'] & ITEM_HIDDEN) { +// fixme set item visible as well + + if($parent_item['item_restrict'] & ITEM_HIDDEN) { $r = q("UPDATE `item` SET `item_restrict` = %d WHERE `id` = %d LIMIT 1", intval($parent_item['item_restrict'] - ITEM_HIDDEN), intval($parent_item['id']) |