alecpl
2008-10-05 112c9133bb8dc3b4e8f1d47241fa57c86dd5065c
- removed deprecated rcube_add_label() and all uses
- code for 'show' action added in r1937 moved to show.inc


7 files modified
50 ■■■■■ changed files
program/include/main.inc 17 ●●●●● patch | view | raw | blame | history
program/steps/addressbook/edit.inc 3 ●●●● patch | view | raw | blame | history
program/steps/addressbook/func.inc 2 ●●● patch | view | raw | blame | history
program/steps/mail/compose.inc 4 ●●●● patch | view | raw | blame | history
program/steps/mail/func.inc 13 ●●●● patch | view | raw | blame | history
program/steps/mail/show.inc 9 ●●●● patch | view | raw | blame | history
program/steps/settings/func.inc 2 ●●● patch | view | raw | blame | history
program/include/main.inc
@@ -133,20 +133,6 @@
/**
 * Add a localized label to the client environment
 * @deprecated
 */
function rcube_add_label()
  {
  global $OUTPUT;
  $arg_list = func_get_args();
  foreach ($arg_list as $i => $name)
    $OUTPUT->add_label($name);
  }
/**
 * Garbage collector function for temp files.
 * Remove temp files older than two days
 */
@@ -913,8 +899,7 @@
  $attrib += array('maxlength' => 100, 'relanames' => false);
  // add some labels to client
  rcube_add_label('purgefolderconfirm');
  rcube_add_label('deletemessagesconfirm');
  $RCMAIL->output->add_label('purgefolderconfirm', 'deletemessagesconfirm');
  
  $type = $attrib['type'] ? $attrib['type'] : 'ul';
  unset($attrib['type']);
program/steps/addressbook/edit.inc
@@ -43,8 +43,7 @@
  }
  // add some labels to client
  rcube_add_label('noemailwarning');
  rcube_add_label('nonamewarning');
  $OUTPUT->add_label('noemailwarning', 'nonamewarning');
  list($form_start, $form_end) = get_form_tags($attrib);
  unset($attrib['form']);
program/steps/addressbook/func.inc
@@ -114,7 +114,7 @@
  $OUTPUT->include_script('list.js');
  
  // add some labels to client
  rcube_add_label('deletecontactconfirm');
  $OUTPUT->add_label('deletecontactconfirm');
  
  return $out;
  }
program/steps/mail/compose.inc
@@ -81,7 +81,7 @@
}
// add some labels to client
rcube_add_label('nosubject', 'nosenderwarning', 'norecipientwarning', 'nosubjectwarning', 'nobodywarning', 'notsentwarning', 'savingmessage', 'sendingmessage', 'messagesaved', 'converting');
$OUTPUT->add_label('nosubject', 'nosenderwarning', 'norecipientwarning', 'nosubjectwarning', 'nobodywarning', 'notsentwarning', 'savingmessage', 'sendingmessage', 'messagesaved', 'converting');
// add config parameter to client script
$OUTPUT->set_env('draft_autosave', !empty($CONFIG['drafts_mbox']) ? $CONFIG['draft_autosave'] : 0);
@@ -477,7 +477,7 @@
      $attrib['id'],
      JS_OBJECT_NAME), 'foot');
    rcube_add_label('checking');
    $OUTPUT->add_label('checking');
    $OUTPUT->set_env('spellcheck_langs', join(',', $editor_lang_set));
  }
 
program/steps/mail/func.inc
@@ -69,18 +69,9 @@
    $OUTPUT->set_env('junk_mailbox', $CONFIG['junk_mbox']);
  if (!$OUTPUT->ajax_call)
    rcube_add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 'movingmessage');
    $OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 'movingmessage');
  $OUTPUT->set_pagetitle(rcmail_localize_foldername($IMAP->get_mailbox_name()));
  }
else if ($RCMAIL->action == 'show')
  {
  // set current mailbox in client environment
  $OUTPUT->set_env('mailbox', $IMAP->get_mailbox_name());
  if ($CONFIG['trash_mbox'])
    $OUTPUT->set_env('trash_mailbox', $CONFIG['trash_mbox']);
  if (!$OUTPUT->ajax_call)
    rcube_add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 'movingmessage');
  }
@@ -99,7 +90,7 @@
  $sort_order = $_SESSION['sort_order'];
  
  // add some labels to client
  rcube_add_label('from', 'to');
  $OUTPUT->add_label('from', 'to');
  // get message headers
  $a_headers = $IMAP->list_headers('', '', $sort_col, $sort_order);
program/steps/mail/show.inc
@@ -71,11 +71,16 @@
  // give message uid to the client
  $OUTPUT->set_env('uid', $MESSAGE->uid);
  // set environement
  $OUTPUT->set_env('safemode', $MESSAGE->is_safe);
  $OUTPUT->set_env('sender', $MESSAGE->sender['string']);
  $OUTPUT->set_env('permaurl', rcmail_url('show', array('_uid' => $MESSAGE->uid, '_mbox' => $mbox_name)));
  $OUTPUT->set_env('mailbox', $mbox_name);
  if ($CONFIG['trash_mbox'])
    $OUTPUT->set_env('trash_mailbox', $CONFIG['trash_mbox']);
  if (!$OUTPUT->ajax_call)
    $OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 'movingmessage');
  // check for unset disposition notification
  if ($MESSAGE->headers->mdn_to &&
      !$MESSAGE->headers->mdn_sent &&
@@ -92,7 +97,7 @@
    }
    else if (empty($CONFIG['mdn_requests']))
    {
      rcube_add_label('mdnrequest');
      $OUTPUT->add_label('mdnrequest');
      $OUTPUT->set_env('mdn_request', true);
    }
  }
program/steps/settings/func.inc
@@ -30,7 +30,7 @@
  $no_override = is_array($config['dont_override']) ? array_flip($config['dont_override']) : array();
  // add some labels to client
  rcube_add_label('nopagesizewarning');
  $RCMAIL->output->add_label('nopagesizewarning');
  
  list($form_start, $form_end) = get_form_tags($attrib, 'save-prefs');
  unset($attrib['form']);