+ try {
+ $choices[$value] = substr($this->to->getAcctUri(), 5) . " [{$this->to->getBestName()}]";
+ } catch (ProfileNoAcctUriException $e) {
+ $choices[$value] = "[?@?] " . $e->profile->getBestName();
+ }
+ }
+
+ // alphabetical order
+ asort($choices);
+
+ // Reverse so we can add entries at the end (can't unshift with a key)
+ $choices = array_reverse($choices);
+
+ if (common_config('notice', 'allowprivate')) {
+ // TRANS: Option in drop-down of potential addressees.
+ // TRANS: %s is a StatusNet sitename.
+ $choices['public:site'] = sprintf(_('Everyone at %s'), common_config('site', 'name'));