aboutsummaryrefslogtreecommitdiffstats
path: root/mod/like.php
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2015-09-03 18:12:02 +0200
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2015-09-03 18:12:02 +0200
commitadfc748bfa724ad8cc9d4ebf6f9d095fc56fb936 (patch)
tree2d5e256b6bb001397939debad609789367745fc9 /mod/like.php
parent2ce1e3678acd59409f1013433db99df6624c2895 (diff)
parentf3cb17ac3b007afd2dc5bf7cdad8a054b4d7fcd8 (diff)
downloadvolse-hubzilla-adfc748bfa724ad8cc9d4ebf6f9d095fc56fb936.tar.gz
volse-hubzilla-adfc748bfa724ad8cc9d4ebf6f9d095fc56fb936.tar.bz2
volse-hubzilla-adfc748bfa724ad8cc9d4ebf6f9d095fc56fb936.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/like.php')
-rwxr-xr-xmod/like.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/mod/like.php b/mod/like.php
index 0d0a1a8c2..42ff9bb8a 100755
--- a/mod/like.php
+++ b/mod/like.php
@@ -117,8 +117,7 @@ function like_content(&$a) {
}
elseif($obj_type == 'thing') {
- $r = q("select * from obj left join term on obj_obj = term_hash where term_hash != ''
- and obj_type = %d and term_hash = '%s' limit 1",
+ $r = q("select * from obj where obj_type = %d and obj_obj = '%s' limit 1",
intval(TERM_OBJ_THING),
dbesc(argv(2))
);
@@ -146,18 +145,18 @@ function like_content(&$a) {
$links = array();
$links[] = array('rel' => 'alternate', 'type' => 'text/html',
- 'href' => z_root() . '/thing/' . $r[0]['term_hash']);
+ 'href' => z_root() . '/thing/' . $r[0]['obj_obj']);
if($r[0]['imgurl'])
- $links[] = array('rel' => 'photo', 'href' => $r[0]['imgurl']);
+ $links[] = array('rel' => 'photo', 'href' => $r[0]['obj_imgurl']);
$target = json_encode(array(
'type' => $tgttype,
- 'title' => $r[0]['term'],
- 'id' => z_root() . '/thing/' . $r[0]['term_hash'],
+ 'title' => $r[0]['obj_term'],
+ 'id' => z_root() . '/thing/' . $r[0]['obj_obj'],
'link' => $links
));
- $plink = '[zrl=' . z_root() . '/thing/' . $r[0]['term_hash'] . ']' . $r[0]['term'] . '[/zrl]';
+ $plink = '[zrl=' . z_root() . '/thing/' . $r[0]['obj_obj'] . ']' . $r[0]['obj_term'] . '[/zrl]';
}