diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-09-02 20:12:40 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-09-02 20:12:40 -0700 |
commit | c22da3da1c5d3c5418cb9f142883adb838db9f76 (patch) | |
tree | 61c8575d5959826918c9b4fcd42666048ce246fc /mod/thing.php | |
parent | 69fc10d5adfa0640792376ad4f417bd7f28fc7f7 (diff) | |
download | volse-hubzilla-c22da3da1c5d3c5418cb9f142883adb838db9f76.tar.gz volse-hubzilla-c22da3da1c5d3c5418cb9f142883adb838db9f76.tar.bz2 volse-hubzilla-c22da3da1c5d3c5418cb9f142883adb838db9f76.zip |
start to modularise the clone import and sync functions
Diffstat (limited to 'mod/thing.php')
-rw-r--r-- | mod/thing.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mod/thing.php b/mod/thing.php index 86712d9eb..03dc7db5b 100644 --- a/mod/thing.php +++ b/mod/thing.php @@ -109,6 +109,15 @@ function thing_init(&$a) { ); info( t('Thing updated') . EOL); + + $r = q("select * from obj where obj_channel = %d and obj_obj = '%s' limit 1", + intval(local_channel()), + dbesc($term_hash) + ); + if($r) { + build_sync_packet(0, array('obj' => $r)); + } + return; } @@ -157,6 +166,14 @@ function thing_init(&$a) { info( t('Thing added')); + $r = q("select * from obj where obj_channel = %d and obj_obj = '%s' limit 1", + intval(local_channel()), + dbesc($hash) + ); + if($r) { + build_sync_packet(0, array('obj' => $r)); + } + if($activity) { $arr = array(); $links = array(array('rel' => 'alternate','type' => 'text/html', 'href' => $url)); @@ -310,6 +327,10 @@ function thing_content(&$a) { intval(local_channel()) ); + $r[0]['obj_deleted'] = 1; + + build_sync_packet(0,array('obj' => $r)); + return $o; } |