diff options
author | root <root@bawker.net> | 2014-05-10 10:55:50 -0700 |
---|---|---|
committer | root <root@bawker.net> | 2014-05-10 10:55:50 -0700 |
commit | 80796c78f5326c670893476fe8e9024c30ebffcc (patch) | |
tree | 9be350288804ab8fa46e2ce10043c91e5c97672f /include/ItemObject.php | |
parent | 711719ce0ce340fbcda7559bf20582e85e4b1e3d (diff) | |
parent | 481b4c21c9ab6e7e6df8f65ef97135fb5807d7fd (diff) | |
download | volse-hubzilla-80796c78f5326c670893476fe8e9024c30ebffcc.tar.gz volse-hubzilla-80796c78f5326c670893476fe8e9024c30ebffcc.tar.bz2 volse-hubzilla-80796c78f5326c670893476fe8e9024c30ebffcc.zip |
Merge branch 'master' of https://github.com/chriswinstead/red
Diffstat (limited to 'include/ItemObject.php')
-rw-r--r-- | include/ItemObject.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/ItemObject.php b/include/ItemObject.php index 2922ee473..36070335d 100644 --- a/include/ItemObject.php +++ b/include/ItemObject.php @@ -123,6 +123,14 @@ class Item extends BaseObject { $location = format_location($item); + $like_count = ((x($alike,$item['mid'])) ? $alike[$item['mid']] : ''); + $like_list = ((x($alike,$item['mid'])) ? $alike[$item['mid'] . '-l'] : ''); + $like_button_label = ((x($alike,$item['mid'])) && ($alike[$item['mid']] < 2 ) ? t('like') : t('likes')); + if (feature_enabled($conv->get_profile_owner(),'dislike')) { + $dislike_count = ((x($dlike,$item['mid'])) ? $dlike[$item['mid']] : ''); + $dislike_list = ((x($dlike,$item['mid'])) ? $dlike[$item['mid'] . '-l'] : ''); + $dislike_button_label = ((x($dlike,$item['mid'])) && ($dlike[$item['mid']] < 2) ? t('dislike') : t('dislikes')); + } $showlike = ((x($alike,$item['mid'])) ? format_like($alike[$item['mid']],$alike[$item['mid'] . '-l'],'like',$item['mid']) : ''); $showdislike = ((x($dlike,$item['mid']) && feature_enabled($conv->get_profile_owner(),'dislike')) @@ -251,7 +259,12 @@ class Item extends BaseObject { 'drop' => $drop, 'multidrop' => ((feature_enabled($conv->get_profile_owner(),'multi_delete')) ? $multidrop : ''), // end toolbar buttons - + 'like_count' => $like_count, + 'like_list' => $like_list, + 'like_button_label' => $like_button_label, + 'dislike_count' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? $dislike_count : ''), + 'dislike_list' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? $dislike_list : ''), + 'dislike_button_label' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? $dislike_button_label : ''), 'showlike' => $showlike, 'showdislike' => $showdislike, 'comment' => $this->get_comment_box($indent), |