]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/personaltagcloudsection.php
Merge remote-tracking branch 'upstream/nightly' into nightly
[quix0rs-gnu-social.git] / lib / personaltagcloudsection.php
index cc1693abcbb44ca0ed6a6f63db9c7ffd5c69f3d0..46b4661e897ec1f8242f1185d5d7a885c6b493e9 100644 (file)
@@ -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()
@@ -58,8 +56,6 @@ class PersonalTagCloudSection extends TagCloudSection
 
     function getTags()
     {
-        $inbox = Inbox::staticGet('user_id', $this->user->id);
-
         $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.
 
@@ -82,7 +78,7 @@ class PersonalTagCloudSection extends TagCloudSection
 
         $tag = Memcached_DataObject::cachedQuery('Notice_tag',
                                                  sprintf($qry,
-                                                         $this->user->id),
+                                                         $this->profile->getID()),
                                                  3600);
         return $tag;
     }