diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/import.php | 3 | ||||
-rwxr-xr-x | mod/like.php | 16 | ||||
-rw-r--r-- | mod/network.php | 2 |
3 files changed, 19 insertions, 2 deletions
diff --git a/mod/import.php b/mod/import.php index 0e43d2444..563967aa2 100644 --- a/mod/import.php +++ b/mod/import.php @@ -432,6 +432,9 @@ function import_post(&$a) { if(is_array($data['obj'])) import_objs($channel,$data['obj']); + if(is_array($data['likes'])) + import_likes($channel,$data['likes']); + if(is_array($data['app'])) import_apps($channel,$data['app']); diff --git a/mod/like.php b/mod/like.php index 87f012874..ce8bc3063 100755 --- a/mod/like.php +++ b/mod/like.php @@ -219,6 +219,9 @@ function like_content(&$a) { ); if($z) { + $z[0]['deleted'] = 1; + build_sync_packet($ch[0]['channel_id'],array('likes' => $z)); + q("delete from likes where id = %d limit 1", intval($z[0]['id']) ); @@ -497,7 +500,18 @@ function like_content(&$a) { dbesc($obj_id), dbesc(($target) ? $target : $object) ); - }; + $r = q("select * from likes where liker = '%s' and likee = '%s' and i_mid = '%s' and verb = '%s' and target_type = '%s' and target_id = '%s' ", + dbesc($observer['xchan_hash']), + dbesc($ch[0]['channel_hash']), + dbesc($mid), + dbesc($activity), + dbesc(($tgttype)? $tgttype : $objtype), + dbesc($obj_id) + ); + if($r) + build_sync_packet($ch[0]['channel_id'],array('likes' => $r)); + + } proc_run('php',"include/notifier.php","like","$post_id"); diff --git a/mod/network.php b/mod/network.php index 82c68424c..53de975a4 100644 --- a/mod/network.php +++ b/mod/network.php @@ -232,7 +232,7 @@ function network_content(&$a, $update = 0, $load = false) { if($r) { $sql_extra = " AND item.parent IN ( SELECT DISTINCT parent FROM item WHERE true $sql_options AND uid = " . intval(local_channel()) . " AND ( author_xchan = '" . dbesc($r[0]['abook_xchan']) . "' or owner_xchan = '" . dbesc($r[0]['abook_xchan']) . "' ) $item_normal ) "; $title = replace_macros(get_markup_template("section_title.tpl"),array( - '$title' => (($_GET['pf'] === '1') ? t('Forum: ') : t('Connection: ')) . $r[0]['xchan_name'] + '$title' => '<a href="' . zid($r[0]['xchan_url']) . '" ><img src="' . zid($r[0]['xchan_photo_s']) . '" alt="' . urlencode($r[0]['xchan_name']) . '" /></a> <a href="' . zid($r[0]['xchan_url']) . '" >' . $r[0]['xchan_name'] . '</a>' )); $o = $tabs; $o .= $title; |