aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ItemObject.php4
-rw-r--r--include/conversation.php2
-rw-r--r--include/taxonomy.php9
3 files changed, 8 insertions, 7 deletions
diff --git a/include/ItemObject.php b/include/ItemObject.php
index 136e08eb7..1785d55e7 100644
--- a/include/ItemObject.php
+++ b/include/ItemObject.php
@@ -168,10 +168,6 @@ class Item extends BaseObject {
$responses = get_responses($conv_responses,$response_verbs,$this,$item);
-
-
- $like_button_label = tt('Like','Likes',$like_count,'noun');
-
$like_count = ((x($conv_responses['like'],$item['mid'])) ? $conv_responses['like'][$item['mid']] : '');
$like_list = ((x($conv_responses['like'],$item['mid'])) ? $conv_responses['like'][$item['mid'] . '-l'] : '');
if (count($like_list) > MAX_LIKERS) {
diff --git a/include/conversation.php b/include/conversation.php
index 17822d0d5..8bc42b34b 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1664,7 +1664,7 @@ function get_responses($conv_responses,$response_verbs,$ob,$item) {
if(count($ret[$v]['list']) > MAX_LIKERS) {
$ret[$v]['list_part'] = array_slice($ret[$v]['list'], 0, MAX_LIKERS);
array_push($ret[$v]['list_part'], '<a href="#" data-toggle="modal" data-target="#' . $v . 'Modal-'
- . $ob->get_id() . '"><b>' . t('View all') . '</b></a>');
+ . (($ob) ? $ob->get_id() : $item['id']) . '"><b>' . t('View all') . '</b></a>');
}
else {
$ret[$v]['list_part'] = '';
diff --git a/include/taxonomy.php b/include/taxonomy.php
index be80008df..d36c05db2 100644
--- a/include/taxonomy.php
+++ b/include/taxonomy.php
@@ -98,7 +98,12 @@ function format_term_for_display($term) {
function tagadelic($uid, $count = 0, $authors = '', $flags = 0, $restrict = 0, $type = TERM_HASHTAG) {
- $sql_options = '';
+ require_once('include/security.php');
+
+ if(! perm_is_allowed($uid,get_observer_hash(),'view_stream'))
+ return array();
+
+ $sql_options = item_permissions_sql($uid);
$count = intval($count);
if($flags)
@@ -114,7 +119,7 @@ function tagadelic($uid, $count = 0, $authors = '', $flags = 0, $restrict = 0, $
// Fetch tags
$r = q("select term, count(term) as total from term left join item on term.oid = item.id
where term.uid = %d and term.type = %d
- and otype = %d and item_restrict = %d and item_private = 0
+ and otype = %d and item_restrict = %d
$sql_options
group by term order by total desc %s",
intval($uid),