aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-09-09 19:14:42 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-09-09 19:14:42 -0700
commit887a8add2d927111c51167ef8b9700d03fe69e91 (patch)
treeb3ec4cff5ec2b72f457de8c250dc9abe4147d500 /mod
parent82986cc993133dbe7b9bbc966539ae188b070215 (diff)
downloadvolse-hubzilla-887a8add2d927111c51167ef8b9700d03fe69e91.tar.gz
volse-hubzilla-887a8add2d927111c51167ef8b9700d03fe69e91.tar.bz2
volse-hubzilla-887a8add2d927111c51167ef8b9700d03fe69e91.zip
populate wall element
Diffstat (limited to 'mod')
-rw-r--r--mod/dfrn_notify.php1
-rw-r--r--mod/item.php13
2 files changed, 11 insertions, 3 deletions
diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php
index 7bcf2af09..a1a6ab716 100644
--- a/mod/dfrn_notify.php
+++ b/mod/dfrn_notify.php
@@ -182,6 +182,7 @@ function dfrn_notify_post(&$a) {
// remote reply to our post. Import and then notify everybody else.
$datarray = get_atom_elements($item);
$datarray['type'] = 'remote-comment';
+ $datarray['wall'] = 1;
$datarray['parent-uri'] = $parent_uri;
$datarray['uid'] = $importer['importer_uid'];
$datarray['contact-id'] = $importer['id'];
diff --git a/mod/item.php b/mod/item.php
index 20a2488c5..5e4f54ce0 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -96,23 +96,30 @@ function item_post(&$a) {
if($post_type == 'net-comment') {
if($parent_item !== null) {
- if($parent_item['type'] == 'remote')
+ if($parent_item['type'] == 'remote') {
$post_type = 'remote-comment';
- else
+ }
+ else {
$post_type = 'wall-comment';
+ }
}
}
+ $wall = 0;
+ if($post_type == 'wall' || $post_type == 'wall-comment')
+ $wall = 1;
+
$notify_type = (($parent) ? 'comment-new' : 'wall-new' );
$uri = item_new_uri($a->get_hostname(),$profile_uid);
- $r = q("INSERT INTO `item` (`uid`,`type`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`,
+ $r = q("INSERT INTO `item` (`uid`,`type`,`wall`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`,
`author-name`, `author-link`, `author-avatar`, `created`,
`edited`, `changed`, `uri`, `title`, `body`, `location`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`)
VALUES( %d, '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )",
intval($profile_uid),
dbesc($post_type),
+ intval($wall),
intval($contact_id),
dbesc($contact_record['name']),
dbesc($contact_record['url']),