From 3de93ddd79260117b42f43766e5d892048774efe Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 27 Mar 2015 23:53:57 +0100 Subject: [PATCH] Needed to add notice_id to selected fields ... :-( Signed-off-by: Roland Haeder --- plugins/TagCloud/lib/attachmenttagcloudsection.php | 2 +- plugins/TagCloud/lib/grouptagcloudsection.php | 2 +- plugins/TagCloud/lib/inboxtagcloudsection.php | 2 +- plugins/TagCloud/lib/personaltagcloudsection.php | 2 +- plugins/TagCloud/lib/publictagcloudsection.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/TagCloud/lib/attachmenttagcloudsection.php b/plugins/TagCloud/lib/attachmenttagcloudsection.php index 2c8fc5ee1a..5a8614ebb1 100644 --- a/plugins/TagCloud/lib/attachmenttagcloudsection.php +++ b/plugins/TagCloud/lib/attachmenttagcloudsection.php @@ -75,7 +75,7 @@ class AttachmentTagCloudSection extends TagCloudSection function getTags() { $notice_tag = new Notice_tag; - $query = 'select tag,count(tag) as weight from notice_tag join file_to_post on (notice_tag.notice_id=post_id) join notice on notice_id = notice.id where file_id=' . $notice_tag->escape($this->out->attachment->id) . ' group by tag order by weight desc'; + $query = 'select tag, notice_id, count(tag) as weight from notice_tag join file_to_post on (notice_tag.notice_id=post_id) join notice on notice_id = notice.id where file_id=' . $notice_tag->escape($this->out->attachment->id) . ' group by tag order by weight desc'; $notice_tag->query($query); return $notice_tag; } diff --git a/plugins/TagCloud/lib/grouptagcloudsection.php b/plugins/TagCloud/lib/grouptagcloudsection.php index 5ed14560ce..68af4d3074 100644 --- a/plugins/TagCloud/lib/grouptagcloudsection.php +++ b/plugins/TagCloud/lib/grouptagcloudsection.php @@ -76,7 +76,7 @@ class GroupTagCloudSection extends TagCloudSection $namestring = implode(',', $quoted); - $qry = 'SELECT notice_tag.tag, '. + $qry = 'SELECT notice_tag.tag, notice_tag.notice_id, '. $weightexpr . ' as weight ' . 'FROM notice_tag JOIN notice ' . 'ON notice_tag.notice_id = notice.id ' . diff --git a/plugins/TagCloud/lib/inboxtagcloudsection.php b/plugins/TagCloud/lib/inboxtagcloudsection.php index 4268ee4854..43e034b57f 100644 --- a/plugins/TagCloud/lib/inboxtagcloudsection.php +++ b/plugins/TagCloud/lib/inboxtagcloudsection.php @@ -70,7 +70,7 @@ class InboxTagCloudSection extends TagCloudSection $weightexpr = common_sql_weight('notice_tag.created', common_config('tag', 'dropoff')); // @fixme should we use the cutoff too? Doesn't help with indexing per-user. - $qry = 'SELECT notice_tag.tag, '. + $qry = 'SELECT notice_tag.tag, notice_tag.notice_id, '. $weightexpr . ' as weight ' . 'FROM notice_tag JOIN notice ' . 'ON notice_tag.notice_id = notice.id ' . diff --git a/plugins/TagCloud/lib/personaltagcloudsection.php b/plugins/TagCloud/lib/personaltagcloudsection.php index e46aa2d662..0aa268bb30 100644 --- a/plugins/TagCloud/lib/personaltagcloudsection.php +++ b/plugins/TagCloud/lib/personaltagcloudsection.php @@ -59,7 +59,7 @@ class PersonalTagCloudSection extends TagCloudSection $weightexpr = common_sql_weight('notice_tag.created', common_config('tag', 'dropoff')); // @fixme should we use the cutoff too? Doesn't help with indexing per-user. - $qry = 'SELECT notice_tag.tag, '. + $qry = 'SELECT notice_tag.tag, notice_tag.notice_id, '. $weightexpr . ' as weight ' . 'FROM notice_tag JOIN notice ' . 'ON notice_tag.notice_id = notice.id ' . diff --git a/plugins/TagCloud/lib/publictagcloudsection.php b/plugins/TagCloud/lib/publictagcloudsection.php index bf88091a90..1ba4fa0cf4 100644 --- a/plugins/TagCloud/lib/publictagcloudsection.php +++ b/plugins/TagCloud/lib/publictagcloudsection.php @@ -77,7 +77,7 @@ class PublicTagCloudSection extends TagCloudSection $weightexpr = common_sql_weight('notice_tag.created', common_config('tag', 'dropoff')); // @fixme should we use the cutoff too? Doesn't help with indexing per-user. - $qry = 'SELECT notice_tag.tag, '. + $qry = 'SELECT notice_tag.tag, notice_tag.notice_id, '. $weightexpr . ' as weight ' . 'FROM notice_tag JOIN notice ' . 'ON notice_tag.notice_id = notice.id ' . -- 2.39.5