]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/peopletagsforuser.php
ShowstreamAction fixes so it's not as horrible
[quix0rs-gnu-social.git] / actions / peopletagsforuser.php
index cc281339400d1f2e033b97ea18055b7f4208e977..827b284d5c3acf567cf550f5afdae99ed06c721b 100644 (file)
@@ -58,7 +58,12 @@ class PeopletagsforuserAction extends Action
     {
         parent::prepare($args);
 
-        $nickname_arg = $this->arg('nickname');
+        if (common_config('singleuser', 'enabled')) {
+            $nickname_arg = User::singleUserNickname();
+        } else {
+            $nickname_arg = $this->arg('nickname');
+        }
+
         $nickname = common_canonical_nickname($nickname_arg);
 
         // Permanent redirect on non-canonical nickname
@@ -69,15 +74,13 @@ class PeopletagsforuserAction extends Action
                 $args['page'] = $this->arg['page'];
             }
             common_redirect(common_local_url('peopletagsforuser', $args), 301);
-            return false;
         }
 
-        $this->user = User::staticGet('nickname', $nickname);
+        $this->user = User::getKV('nickname', $nickname);
 
         if (!$this->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->tagged = $this->user->getProfile();
@@ -85,7 +88,6 @@ class PeopletagsforuserAction extends Action
         if (!$this->tagged) {
             // TRANS: Error message displayed when referring to a user without a profile.
             $this->serverError(_('User has no profile.'));
-            return false;
         }
 
         $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
@@ -111,7 +113,7 @@ class PeopletagsforuserAction extends Action
                     '(http://en.wikipedia.org/wiki/Micro-blogging) service ' .
                     'based on the Free Software [StatusNet](http://status.net/) tool. ' .
                     'You can easily keep track of what they ' .
-                    'are doing by subscribing to the tag\'s timeline.' ), $this->tagged->nickname);
+                    'are doing by subscribing to the list\'s timeline.' ), $this->tagged->nickname);
         $this->elementStart('div', array('id' => 'anon_notice'));
         $this->raw(common_markup_to_html($notice));
         $this->elementEnd('div');