Commit 6a36121a authored by mmn's avatar mmn

Spiff up the PersonalTagCloudSection class

missing a fix in actions/showstream.php for the switched position
of arguments in the constructor
parent f9d82a6a
...@@ -27,9 +27,7 @@ ...@@ -27,9 +27,7 @@
* @link http://status.net/ * @link http://status.net/
*/ */
if (!defined('STATUSNET') && !defined('LACONICA')) { if (!defined('GNUSOCIAL')) { exit(1); }
exit(1);
}
/** /**
* Personal tag cloud section * Personal tag cloud section
...@@ -42,12 +40,12 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { ...@@ -42,12 +40,12 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
*/ */
class PersonalTagCloudSection extends TagCloudSection 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); parent::__construct($out);
$this->user = $user; $this->profile = $profile;
} }
function title() function title()
...@@ -80,7 +78,7 @@ class PersonalTagCloudSection extends TagCloudSection ...@@ -80,7 +78,7 @@ class PersonalTagCloudSection extends TagCloudSection
$tag = Memcached_DataObject::cachedQuery('Notice_tag', $tag = Memcached_DataObject::cachedQuery('Notice_tag',
sprintf($qry, sprintf($qry,
$this->user->id), $this->profile->getID()),
3600); 3600);
return $tag; return $tag;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment