]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/peopletagsforuser.php
Merge branch 'nightly' into 'nightly'
[quix0rs-gnu-social.git] / actions / peopletagsforuser.php
index d30f7321c12dca1c6fefe7c6561c0b67af33bc6a..a93032815634c9c4106d1d66d5df434d5b77903c 100644 (file)
@@ -54,7 +54,7 @@ class PeopletagsforuserAction extends Action
         }
     }
 
-    function prepare($args)
+    function prepare(array $args = array())
     {
         parent::prepare($args);
 
@@ -74,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();
@@ -90,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;
@@ -98,9 +95,9 @@ class PeopletagsforuserAction extends Action
         return true;
     }
 
-    function handle($args)
+    function handle()
     {
-        parent::handle($args);
+        parent::handle();
         $this->showPage();
     }
 
@@ -129,7 +126,7 @@ class PeopletagsforuserAction extends Action
         $offset = ($this->page-1) * PEOPLETAGS_PER_PAGE;
         $limit  = PEOPLETAGS_PER_PAGE + 1;
 
-        $ptags = $this->tagged->getOtherTags(common_current_user(), $offset, $limit);
+        $ptags = $this->tagged->getOtherTags($this->scoped, $offset, $limit);
 
         $pl = new PeopletagList($ptags, $this);
         $cnt = $pl->show();