-
- $user = User::staticGet('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();
- $this->peopletag = Profile_list::pkeyGet(array('tagger' => $user->id, 'tag' => $tag));
-
- $current = common_current_user();
- $can_see = !empty($this->peopletag) && (!$this->peopletag->private ||
- ($this->peopletag->private && $this->peopletag->tagger === $current->id));
-
- if (!$can_see) {
- // TRANS: Client error displayed trying to reference a non-existing people tag.
- $this->clientError(_('No such people tag.'), 404);
- return false;
- }
-
- $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
- $this->userProfile = Profile::current();
-
- $stream = new PeopletagNoticeStream($this->peopletag, $this->userProfile);
-
- $this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE,
- NOTICES_PER_PAGE + 1);
-
- if ($this->page > 1 && $this->notice->N == 0) {
- // TRANS: Server error when page not found (404).
- $this->serverError(_('No such page.'), $code = 404);
- }
-
- return true;