From f0b640058427aff2d9d60899f9005980ab89c0ef Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Sun, 31 Oct 2010 16:38:22 -0700 Subject: more lint --- mod/display.php | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) (limited to 'mod/display.php') diff --git a/mod/display.php b/mod/display.php index 84176d293..2e35cd6ac 100644 --- a/mod/display.php +++ b/mod/display.php @@ -113,40 +113,18 @@ function display_content(&$a) { if(count($r)) { foreach($r as $item) { - $sparkle = ''; - if(($item['verb'] == ACTIVITY_LIKE) && ($item['id'] != $item['parent'])) { - $url = $item['url']; - if(($item['network'] === 'dfrn') && (! $item['self'])) { - $url = $a->get_baseurl() . '/redir/' . $item['contact-id']; - $sparkle = ' class="sparkle"'; - } - if(! is_array($alike[$item['parent'] . '-l'])) - $alike[$item['parent'] . '-l'] = array(); - $alike[$item['parent']] ++; - $alike[$item['parent'] . '-l'][] = '' . $item['name'] . ''; - } - if(($item['verb'] == ACTIVITY_DISLIKE) && ($item['id'] != $item['parent'])) { - $url = $item['url']; - if(($item['network'] === 'dfrn') && (! $item['self'])) { - $url = $a->get_baseurl() . '/redir/' . $item['contact-id']; - $sparkle = ' class="sparkle"'; - } - if(! is_array($dlike[$item['parent'] . '-l'])) - $dlike[$item['parent'] . '-l'] = array(); - $dlike[$item['parent']] ++; - $dlike[$item['parent'] . '-l'][] = '' . $item['name'] . ''; - } + like_puller($a,$item,$alike,'like'); + like_puller($a,$item,$dlike,'dislike'); } - - foreach($r as $item) { $comment = ''; $template = $tpl; $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ; - if((($item['verb'] == ACTIVITY_LIKE) || ($item['verb'] == ACTIVITY_DISLIKE)) && ($item['id'] != $item['parent'])) + if(((activity_match($item['verb'],ACTIVITY_LIKE)) || (activity_match($item['verb'],ACTIVITY_DISLIKE))) + && ($item['id'] != $item['parent'])) continue; $lock = (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid']) -- cgit v1.2.3