]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/accountprofileblock.php
common_good_rand was _not_ a "good rand", only hex
[quix0rs-gnu-social.git] / lib / accountprofileblock.php
index 59c27776018dac7c2bfddaf27e5557bf120bf0e0..36f1fee27143b8bb7c7b817ab74ece0e7bb59ae0 100644 (file)
@@ -55,18 +55,12 @@ class AccountProfileBlock extends ProfileBlock
     {
         parent::__construct($out);
         $this->profile = $profile;
-        $this->user    = User::staticGet('id', $profile->id);
+        $this->user    = User::getKV('id', $profile->id);
     }
 
     function avatar()
     {
-        $avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE);
-        if (empty($avatar)) {
-            $avatar = $this->profile->getAvatar(73);
-        }
-        return (!empty($avatar)) ?
-            $avatar->displayUrl() :
-            Avatar::defaultImage(AVATAR_PROFILE_SIZE);
+        return $this->profile->avatarUrl(AVATAR_PROFILE_SIZE);
     }
 
     function name()
@@ -94,6 +88,15 @@ class AccountProfileBlock extends ProfileBlock
         return $this->profile->bio;
     }
 
+    function otherProfiles()
+    {
+        $others = array();
+
+        Event::handle('OtherAccountProfiles', array($this->profile, &$others));
+        
+        return $others;
+    }
+
     function showTags()
     {
         $cur = common_current_user();
@@ -138,9 +141,6 @@ class AccountProfileBlock extends ProfileBlock
             if (Event::handle('StartProfilePageActionsElements', array($this->out, $this->profile))) {
                 if (empty($cur)) { // not logged in
                     if (Event::handle('StartProfileRemoteSubscribe', array($this->out, $this->profile))) {
-                        $this->out->elementStart('li', 'entity_subscribe');
-                        $this->showRemoteSubscribeLink();
-                        $this->out->elementEnd('li');
                         Event::handle('EndProfileRemoteSubscribe', array($this->out, $this->profile));
                     }
                 } else {
@@ -298,16 +298,6 @@ class AccountProfileBlock extends ProfileBlock
         $this->out->elementEnd('li');
     }
 
-    function showRemoteSubscribeLink()
-    {
-        $url = common_local_url('remotesubscribe',
-                                array('nickname' => $this->profile->nickname));
-        $this->out->element('a', array('href' => $url,
-                                  'class' => 'entity_remote_subscribe'),
-                       // TRANS: Link text for link that will subscribe to a remote profile.
-                       _m('BUTTON','Subscribe'));
-    }
-
     function show()
     {
         $this->out->elementStart('div', 'profile_block account_profile_block section');