"like" attributed to wrong person on oocasion

This commit is contained in:
Friendika 2010-11-19 14:28:28 -08:00
parent ef39bd080f
commit e4bbffe18c
1 changed files with 6 additions and 6 deletions

View File

@ -1385,18 +1385,18 @@ function like_puller($a,$item,&$arr,$mode) {
$verb = (($mode === 'like') ? ACTIVITY_LIKE : ACTIVITY_DISLIKE); $verb = (($mode === 'like') ? ACTIVITY_LIKE : ACTIVITY_DISLIKE);
if((activity_match($item['verb'],$verb)) && ($item['id'] != $item['parent'])) { if((activity_match($item['verb'],$verb)) && ($item['id'] != $item['parent'])) {
$url = $item['url']; $url = $item['author-link'];
if(($item['network'] === 'dfrn') && (! $item['self'])) { // if(($item['network'] === 'dfrn') && (! $item['self'])) {
$url = $a->get_baseurl() . '/redir/' . $item['contact-id']; // $url = $a->get_baseurl() . '/redir/' . $item['contact-id'];
$sparkle = ' class="sparkle" '; // $sparkle = ' class="sparkle" ';
} // }
if(! ((isset($arr[$item['parent'] . '-l'])) && (is_array($arr[$item['parent'] . '-l'])))) if(! ((isset($arr[$item['parent'] . '-l'])) && (is_array($arr[$item['parent'] . '-l']))))
$arr[$item['parent'] . '-l'] = array(); $arr[$item['parent'] . '-l'] = array();
if(! isset($arr[$item['parent']])) if(! isset($arr[$item['parent']]))
$arr[$item['parent']] = 1; $arr[$item['parent']] = 1;
else else
$arr[$item['parent']] ++; $arr[$item['parent']] ++;
$arr[$item['parent'] . '-l'][] = '<a href="'. $url . '"'. $sparkle .'>' . $item['name'] . '</a>'; $arr[$item['parent'] . '-l'][] = '<a href="'. $url . '"'. $sparkle .'>' . $item['author-name'] . '</a>';
} }
return; return;
}} }}