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/profile.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/profile.php')
-rw-r--r-- | mod/profile.php | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/mod/profile.php b/mod/profile.php index 3ab77a094..a3148eea3 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -276,31 +276,8 @@ function profile_content(&$a, $update = 0) { 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) { @@ -313,7 +290,8 @@ function profile_content(&$a, $update = 0) { $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']) |