// TRANS: Client error displayed trying to send a direct message to a user while sender and
// TRANS: receiver are not subscribed to each other.
$this->clientError(_('You cannot send a message to this user.'), 404);
- } else if ($user->id == $this->other->id) {
+ } else if ($this->scoped->id == $this->other->id) {
// TRANS: Client error displayed trying to send a direct message to self.
$this->clientError(_('Do not send a message to yourself; ' .
'just say it to yourself quietly instead.'), 403);
}
- $message = Message::saveNew($user->id, $this->other->id, $this->content, 'web');
+ $message = Message::saveNew($this->scoped->id, $this->other->id, $this->content, 'web');
$message->notify();
if ($this->boolean('ajax')) {
$this->elementEnd('html');
} else {
$url = common_local_url('outbox',
- array('nickname' => $user->nickname));
+ array('nickname' => $this->scoped->nickname));
common_redirect($url, 303);
}
}
$this->trimmed('lon'),
$this->trimmed('location_id'),
$this->trimmed('location_ns'),
- $user->getProfile());
+ $this->scoped);
} else {
$locOptions = Notice::locationOptions(null,
null,
null,
null,
- $user->getProfile());
+ $this->scoped);
}
$options = array_merge($options, $locOptions);
}
- $author_id = $user->id;
+ $author_id = $this->scoped->id;
$text = $content_shortened;
// Does the heavy-lifting for getting "To:" information
if (Event::handle('StartNoticeSaveWeb', array($this, &$author_id, &$text, &$options))) {
- $notice = Notice::saveNew($user->id, $content_shortened, 'web', $options);
+ $notice = Notice::saveNew($this->scoped->id, $content_shortened, 'web', $options);
if (isset($upload)) {
$upload->attachToNotice($notice);
if ($returnto) {
$url = common_local_url($returnto,
- array('nickname' => $user->nickname));
+ array('nickname' => $this->scoped->nickname));
} else {
$url = common_local_url('shownotice',
array('notice' => $notice->id));