$choices['public:everyone'] = _m('SENDTO','Everyone');
$default = 'public:everyone';
}
- // XXX: better name...?
// TRANS: Option in drop-down of potential addressees.
// TRANS: %s is a StatusNet sitename.
- $choices['public:site'] = sprintf(_('My colleagues at %s'), common_config('site', 'name'));
+ $choices['public:site'] = sprintf(_('Everyone at %s'), common_config('site', 'name'));
$groups = $this->user->getGroups();
- while ($groups->fetch()) {
+ while ($groups instanceof User_group && $groups->fetch()) {
$value = 'group:'.$groups->id;
if (($this->to instanceof User_group) && $this->to->id == $groups->id) {
$default = $value;
$choices[$value] = $groups->getBestName();
}
- // XXX: add users...?
+ // Add subscribed users to dropdown menu
+ $users = $this->user->getSubscribed();
+ while ($users->fetch()) {
+ $value = 'profile:'.$users->id;
+ if ($this->user->streamNicknames()) {
+ $choices[$value] = $users->getNickname();
+ } else {
+ $choices[$value] = $users->getBestName();
+ }
+ }
if ($this->to instanceof Profile) {
$value = 'profile:'.$this->to->id;
}
break;
case 'profile':
- $profile = Profile::staticGet('id', $value);
+ $profile = Profile::getKV('id', $value);
$options['replies'] = array($profile->getUri());
if ($private) {
$options['scope'] = Notice::ADDRESSEE_SCOPE;