1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php
- defined('GNUSOCIAL') || die();
- class SubscriptionsPeopleTagCloudSection extends SubPeopleTagCloudSection
- {
- public function title()
- {
-
- return _('People Tagcloud as tagged');
- }
- public function tagUrl($tag)
- {
- $nickname = $this->out->profile->nickname;
- return common_local_url('subscriptions', array('nickname' => $nickname, 'tag' => $tag));
- }
- public function query()
- {
- return <<<'END'
- SELECT profile_tag.tag, COUNT(profile_tag.tag) AS weight
- FROM profile_tag
- INNER JOIN subscription AS sub
- ON profile_tag.tagger = sub.subscriber
- AND profile_tag.tagged = sub.subscribed
- LEFT JOIN profile_list
- ON profile_tag.tag = profile_list.tag
- AND profile_tag.tagger = profile_list.tagger
- WHERE profile_list.private IS NOT TRUE
- AND sub.subscriber = %d AND sub.subscriber <> sub.subscribed
- GROUP BY profile_tag.tag ORDER BY weight DESC;
- END;
- }
- }
|