function getInstructions()
{
// TRANS: Instant messaging settings page instructions.
// TRANS: [instant messages] is link text, "(%%doc.im%%)" is the link.
// TRANS: the order and formatting of link text and link should remain unchanged.
return _('You can send and receive notices through '.
function getInstructions()
{
// TRANS: Instant messaging settings page instructions.
// TRANS: [instant messages] is link text, "(%%doc.im%%)" is the link.
// TRANS: the order and formatting of link text and link should remain unchanged.
return _('You can send and receive notices through '.
if ($user_im_prefs = User_im_prefs::pkeyGet( array('transport' => $transport, 'user_id' => $user->id) )) {
$user_im_prefs_by_transport[$transport] = $user_im_prefs;
$this->element('p', 'form_confirmed', $user_im_prefs->screenname);
if ($user_im_prefs = User_im_prefs::pkeyGet( array('transport' => $transport, 'user_id' => $user->id) )) {
$user_im_prefs_by_transport[$transport] = $user_im_prefs;
$this->element('p', 'form_confirmed', $user_im_prefs->screenname);
sprintf(_('Current confirmed %s address.'),$transport_info['display']));
$this->hidden('screenname', $user_im_prefs->screenname);
// TRANS: Button label to remove a confirmed IM address.
sprintf(_('Current confirmed %s address.'),$transport_info['display']));
$this->hidden('screenname', $user_im_prefs->screenname);
// TRANS: Button label to remove a confirmed IM address.
// TRANS: Form note in IM settings form.
$this->element('p', 'form_note',
// TRANS: Form note in IM settings form.
// TRANS: Form note in IM settings form.
$this->element('p', 'form_note',
// TRANS: Form note in IM settings form.
$transport_info['display'],
$transport_info['daemonScreenname']));
$this->hidden('screenname', $confirm->address);
$transport_info['display'],
$transport_info['daemonScreenname']));
$this->hidden('screenname', $confirm->address);
} else {
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
} else {
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
$this->input('screenname', _('IM address'),
($this->arg('screenname')) ? $this->arg('screenname') : null,
$this->input('screenname', _('IM address'),
($this->arg('screenname')) ? $this->arg('screenname') : null,
sprintf(_('%s screenname.'),
$transport_info['display']));
$this->elementEnd('li');
sprintf(_('%s screenname.'),
$transport_info['display']));
$this->elementEnd('li');
if ($result === false) {
common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown on database error updating IM preferences.
if ($result === false) {
common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown on database error updating IM preferences.
return;
}
$valid = false;
Event::handle('ValidateImScreenname', array($transport, $screenname, &$valid));
if (!$valid) {
// TRANS: Message given saving IM address that not valid.
return;
}
$valid = false;
Event::handle('ValidateImScreenname', array($transport, $screenname, &$valid));
if (!$valid) {
// TRANS: Message given saving IM address that not valid.
return;
} else if ($this->screennameExists($transport, $screenname)) {
// TRANS: Message given saving IM address that is already set for another user.
return;
} else if ($this->screennameExists($transport, $screenname)) {
// TRANS: Message given saving IM address that is already set for another user.
- // TRANS: Server error thrown on database error adding IM confirmation code.
- $this->serverError(_('Couldn\'t insert confirmation code.'));
- return;
+ // TRANS: Server error thrown on database error adding Instant Messaging confirmation code.
+ $this->serverError(_('Could not insert confirmation code.'));
}
Event::handle('SendImConfirmationCode', array($transport, $screenname, $confirm->code, $user));
}
Event::handle('SendImConfirmationCode', array($transport, $screenname, $confirm->code, $user));
if (!$result) {
common_log_db_error($confirm, 'DELETE', __FILE__);
// TRANS: Server error thrown on database error canceling IM address confirmation.
if (!$result) {
common_log_db_error($confirm, 'DELETE', __FILE__);
// TRANS: Server error thrown on database error canceling IM address confirmation.
if (!$result) {
common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown on database error removing a registered IM address.
if (!$result) {
common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown on database error removing a registered IM address.