]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/showprofiletag.php
Email notify-on-fave moved to Profile_prefs (run upgrade.php)
[quix0rs-gnu-social.git] / actions / showprofiletag.php
index 278246c89421a7a19b245135cf7ad236a62a4840..44ded832b826e1cb8b61f044d8c6f573b4fb2ea1 100644 (file)
@@ -44,7 +44,11 @@ class ShowprofiletagAction extends Action
     {
         parent::prepare($args);
 
-        $tagger_arg = $this->arg('tagger');
+        if (common_config('singleuser', 'enabled')) {
+            $tagger_arg = User::singleUserNickname();
+        } else {
+            $tagger_arg = $this->arg('tagger');
+        }
         $tag_arg = $this->arg('tag');
         $tagger = common_canonical_nickname($tagger_arg);
         $tag = common_canonical_tag($tag_arg);
@@ -57,21 +61,18 @@ class ShowprofiletagAction extends Action
                 $args['page'] = $this->page;
             }
             common_redirect(common_local_url('showprofiletag', $args), 301);
-            return false;
         }
 
         if (!$tagger) {
             // TRANS: Client error displayed when a tagger is expected but not provided.
             $this->clientError(_('No tagger.'), 404);
-            return false;
         }
 
-        $user = User::staticGet('nickname', $tagger);
+        $user = User::getKV('nickname', $tagger);
 
         if (!$user) {
             // TRANS: Client error displayed trying to perform an action related to a non-existing user.
             $this->clientError(_('No such user.'), 404);
-            return false;
         }
 
         $this->tagger = $user->getProfile();
@@ -84,7 +85,6 @@ class ShowprofiletagAction extends Action
         if (!$can_see) {
             // TRANS: Client error displayed trying to reference a non-existing list.
             $this->clientError(_('No such list.'), 404);
-            return false;
         }
 
         $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
@@ -110,7 +110,6 @@ class ShowprofiletagAction extends Action
         if (!$this->peopletag) {
             // TRANS: Client error displayed trying to perform an action related to a non-existing user.
             $this->clientError(_('No such user.'));
-            return;
         }
 
         $this->showPage();
@@ -360,10 +359,12 @@ class ShowprofiletagAction extends Action
 
 class Peopletag extends PeopletagListItem
 {
+    protected $avatarSize = AVATAR_PROFILE_SIZE;
+
     function showStart()
     {
         $mode = $this->peopletag->private ? 'private' : 'public';
-        $this->out->elementStart('div', array('class' => 'hentry peopletag peopletag-profile mode-'.$mode,
+        $this->out->elementStart('div', array('class' => 'h-entry peopletag peopletag-profile mode-'.$mode,
                                              'id' => 'peopletag-' . $this->peopletag->id));
     }
 
@@ -371,9 +372,4 @@ class Peopletag extends PeopletagListItem
     {
         $this->out->elementEnd('div');
     }
-
-    function showAvatar()
-    {
-        parent::showAvatar(AVATAR_PROFILE_SIZE);
-    }
 }