function dolike(ident,verb) {
unpause();
$('#like-rotator-' + ident.toString()).show();
- $.get('like/' + ident.toString() + '?verb=' + verb );
- if(timer) clearTimeout(timer);
- timer = setTimeout(NavUpdate,3000);
+ $.get('like/' + ident.toString() + '?verb=' + verb, NavUpdate );
+// if(timer) clearTimeout(timer);
+// timer = setTimeout(NavUpdate,3000);
liking = 1;
}
$like_item = $r[0];
// Already voted, undo it
- $r = q("UPDATE `item` SET `deleted` = 1, `changed` = '%s' WHERE `id` = %d LIMIT 1",
+ $r = q("UPDATE `item` SET `deleted` = 1, `unseen` = 1, `changed` = '%s' WHERE `id` = %d LIMIT 1",
dbesc(datetime_convert()),
intval($like_item['id'])
);
if($update) {
$r = q("SELECT `parent` AS `item_id`, `contact`.`uid` AS `contact_uid`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
- WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
+ WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND
+ (`item`.`deleted` = 0 OR item.verb = '" . ACTIVITY_LIKE ."' OR item.verb = '" . ACTIVITY_DISLIKE . "')
and `item`.`moderated` = 0 and `item`.`unseen` = 1
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
$sql_extra3 $sql_extra $sql_nets ",
$r = q("SELECT distinct(parent) AS `item_id`, `contact`.`uid` AS `contact-uid`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
+ WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND
+ (`item`.`deleted` = 0 OR item.verb = '" . ACTIVITY_LIKE ."' OR item.verb = '" . ACTIVITY_DISLIKE . "')
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
and `item`.`moderated` = 0 and `item`.`unseen` = 1
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0