Sort ToSelector by AcctUri
This commit is contained in:
parent
73dbc5ca1b
commit
a361fdbd77
@ -94,30 +94,37 @@ class ToSelector extends Widget
|
|||||||
$groups = $this->user->getGroups();
|
$groups = $this->user->getGroups();
|
||||||
|
|
||||||
while ($groups instanceof User_group && $groups->fetch()) {
|
while ($groups instanceof User_group && $groups->fetch()) {
|
||||||
$value = 'group:'.$groups->id;
|
$value = 'group:'.$groups->getID();
|
||||||
if (($this->to instanceof User_group) && $this->to->id == $groups->id) {
|
if (($this->to instanceof User_group) && $this->to->id == $groups->id) {
|
||||||
$default = $value;
|
$default = $value;
|
||||||
}
|
}
|
||||||
$choices[$value] = $groups->getBestName();
|
$choices[$value] = "!{$groups->getNickname()} [{$groups->getBestName()}]";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add subscribed users to dropdown menu
|
// Add subscribed users to dropdown menu
|
||||||
$users = $this->user->getSubscribed();
|
$users = $this->user->getSubscribed();
|
||||||
while ($users->fetch()) {
|
while ($users->fetch()) {
|
||||||
$value = 'profile:'.$users->id;
|
$value = 'profile:'.$users->getID();
|
||||||
if ($this->user->streamNicknames()) {
|
try {
|
||||||
$choices[$value] = $users->getNickname();
|
$choices[$value] = substr($users->getAcctUri(), 5) . " [{$users->getBestName()}]";
|
||||||
} else {
|
} catch (ProfileNoAcctUriException $e) {
|
||||||
$choices[$value] = $users->getBestName();
|
$choices[$value] = "[?@?] " . $e->getBestName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->to instanceof Profile) {
|
if ($this->to instanceof Profile) {
|
||||||
$value = 'profile:'.$this->to->id;
|
$value = 'profile:'.$this->to->getID();
|
||||||
$default = $value;
|
$default = $value;
|
||||||
$choices[$value] = $this->to->getBestName();
|
try {
|
||||||
|
$choices[$value] = substr($this->to->getAcctUri(), 5) . " [{$this->to->getBestName()}]";
|
||||||
|
} catch (ProfileNoAcctUriException $e) {
|
||||||
|
$choices[$value] = "[?@?] " . $e->getBestName();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// alphabetical order
|
||||||
|
asort($choices);
|
||||||
|
|
||||||
$this->out->dropdown($this->id,
|
$this->out->dropdown($this->id,
|
||||||
// TRANS: Label for drop-down of potential addressees.
|
// TRANS: Label for drop-down of potential addressees.
|
||||||
_m('LABEL','To:'),
|
_m('LABEL','To:'),
|
||||||
|
@ -503,6 +503,10 @@ address .poweredby {
|
|||||||
z-index: 99;
|
z-index: 99;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form_notice .to-selector > select {
|
||||||
|
max-width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
.form_settings label[for=notice_to] {
|
.form_settings label[for=notice_to] {
|
||||||
left: 5px;
|
left: 5px;
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user