aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/thing.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/mod/thing.php b/mod/thing.php
index c6b70fbb4..842832d16 100644
--- a/mod/thing.php
+++ b/mod/thing.php
@@ -92,6 +92,20 @@ function thing_init(&$a) {
);
info( t('Thing updated') . EOL);
+
+ $datestamp = datetime_convert();
+
+ $r = q("select obj.*, term.term as obj_term, term.url as obj_url, term.imgurl as obj_imgurl, '%s' as obj_created, '%s' as obj_edited, '%s' as obj_baseurl from obj left join term on obj_obj = term.term_hash where obj_channel = %d and term.term_hash = '%s'",
+ dbesc($datestamp),
+ dbesc($datestamp),
+ dbesc(z_root()),
+ intval(local_channel()),
+ dbesc($term_hash)
+ );
+
+ if($r)
+ build_sync_packet(0,array('obj' => $r));
+
return;
}
@@ -156,6 +170,20 @@ function thing_init(&$a) {
info( t('Thing added'));
+ $datestamp = datetime_convert();
+
+ $r = q("select obj.*, term.term as obj_term, term.url as obj_url, term.imgurl as obj_imgurl, '%s' as obj_created, '%s' as obj_edited, '%s' as obj_baseurl from obj left join term on obj_obj = term.term_hash where obj_channel = %d and term.term_hash = '%s' ",
+ dbesc($datestamp),
+ dbesc($datestamp),
+ dbesc(z_root()),
+ intval(local_channel()),
+ dbesc($term['term_hash'])
+ );
+
+ if($r)
+ build_sync_packet(0,array('obj' => $r));
+
+
if($activity) {
$arr = array();
$links = array(array('rel' => 'alternate','type' => 'text/html', 'href' => $term['url']));