* @link http://status.net/
*/
-if (!defined('STATUSNET') && !defined('LACONICA')) {
- exit(1);
-}
+if (!defined('GNUSOCIAL')) { exit(1); }
/**
* Personal tag cloud section
*/
class PersonalTagCloudSection extends TagCloudSection
{
- var $user = null;
+ protected $profile = null;
- function __construct($out=null, $user=null)
+ function __construct(Profile $profile, HTMLOutputter $out=null)
{
parent::__construct($out);
- $this->user = $user;
+ $this->profile = $profile;
}
function title()
$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 ' .
$tag = Memcached_DataObject::cachedQuery('Notice_tag',
sprintf($qry,
- $this->user->id),
+ $this->profile->getID()),
3600);
return $tag;
}