diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-10-31 16:38:22 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-10-31 16:38:22 -0700 |
commit | f0b640058427aff2d9d60899f9005980ab89c0ef (patch) | |
tree | a7e2f2d7fca62e73f725dc072fa1944150a86bd0 /mod/display.php | |
parent | ceabd7629bab4a490515aa8608acf0738159e1d0 (diff) | |
download | volse-hubzilla-f0b640058427aff2d9d60899f9005980ab89c0ef.tar.gz volse-hubzilla-f0b640058427aff2d9d60899f9005980ab89c0ef.tar.bz2 volse-hubzilla-f0b640058427aff2d9d60899f9005980ab89c0ef.zip |
more lint
Diffstat (limited to 'mod/display.php')
-rw-r--r-- | mod/display.php | 30 |
1 files changed, 4 insertions, 26 deletions
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'][] = '<a href="'. $url . '"' . $sparkle . '>' . $item['name'] . '</a>'; - } - 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'][] = '<a href="'. $url . '"' . $sparkle . '>' . $item['name'] . '</a>'; - } + 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']) |