X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fpersonaltagcloudsection.php;h=3644de201524a4c0b27274c64624bfc917215325;hb=22f6cec9b7b9a04e61ba355730ffab9db9bc8005;hp=c861c4f57f90fb6ceee594b719d2be842cc34acc;hpb=6d5b6d98b5f68d784fee736518eaaae7a26a51f6;p=quix0rs-gnu-social.git diff --git a/lib/personaltagcloudsection.php b/lib/personaltagcloudsection.php index c861c4f57f..3644de2015 100644 --- a/lib/personaltagcloudsection.php +++ b/lib/personaltagcloudsection.php @@ -27,9 +27,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET') && !defined('LACONICA')) { - exit(1); -} +if (!defined('GNUSOCIAL')) { exit(1); } /** * Personal tag cloud section @@ -42,12 +40,12 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { */ 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() @@ -61,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 ' . @@ -80,7 +78,7 @@ class PersonalTagCloudSection extends TagCloudSection $tag = Memcached_DataObject::cachedQuery('Notice_tag', sprintf($qry, - $this->user->id), + $this->profile->getID()), 3600); return $tag; }