Replace more deprecated Roundcube functions
This commit is contained in:
parent
d97ff3dd64
commit
ddd4683255
7 changed files with 23 additions and 22 deletions
|
@ -302,7 +302,7 @@ class calendar extends rcube_plugin
|
|||
$this->rc->output->add_label('libcalendaring.itipaccepted','libcalendaring.itiptentative','libcalendaring.itipdeclined','libcalendaring.itipdelegated','libcalendaring.expandattendeegroup','libcalendaring.expandattendeegroupnodata');
|
||||
|
||||
// initialize attendees autocompletion
|
||||
rcube_autocomplete_init();
|
||||
$this->rc->autocomplete_init();
|
||||
|
||||
$this->rc->output->set_env('timezone', $this->timezone->getName());
|
||||
$this->rc->output->set_env('calendar_driver', $this->rc->config->get('calendar_driver'), false);
|
||||
|
@ -398,13 +398,13 @@ class calendar extends rcube_plugin
|
|||
|
||||
$field_id = 'rcmfd_firstday';
|
||||
$select = new html_select(array('name' => '_first_day', 'id' => $field_id));
|
||||
$select->add(rcube_label('sunday'), '0');
|
||||
$select->add(rcube_label('monday'), '1');
|
||||
$select->add(rcube_label('tuesday'), '2');
|
||||
$select->add(rcube_label('wednesday'), '3');
|
||||
$select->add(rcube_label('thursday'), '4');
|
||||
$select->add(rcube_label('friday'), '5');
|
||||
$select->add(rcube_label('saturday'), '6');
|
||||
$select->add($this->gettext('sunday'), '0');
|
||||
$select->add($this->gettext('monday'), '1');
|
||||
$select->add($this->gettext('tuesday'), '2');
|
||||
$select->add($this->gettext('wednesday'), '3');
|
||||
$select->add($this->gettext('thursday'), '4');
|
||||
$select->add($this->gettext('friday'), '5');
|
||||
$select->add($this->gettext('saturday'), '6');
|
||||
$p['blocks']['view']['options']['first_day'] = array(
|
||||
'title' => html::label($field_id, rcube::Q($this->gettext('first_day'))),
|
||||
'content' => $select->show(strval($this->rc->config->get('calendar_first_day', $this->defaults['calendar_first_day']))),
|
||||
|
@ -475,7 +475,7 @@ class calendar extends rcube_plugin
|
|||
$select_type = new html_select(array('name' => '_alarm_type', 'id' => $field_id));
|
||||
$select_type->add($this->gettext('none'), '');
|
||||
foreach ($this->driver->alarm_types as $type)
|
||||
$select_type->add(rcube_label(strtolower("alarm{$type}option"), 'libcalendaring'), $type);
|
||||
$select_type->add($this->gettext(strtolower("alarm{$type}option"), 'libcalendaring'), $type);
|
||||
|
||||
$p['blocks']['view']['options']['alarmtype'] = array(
|
||||
'title' => html::label($field_id, rcube::Q($this->gettext('defaultalarmtype'))),
|
||||
|
@ -493,7 +493,7 @@ class calendar extends rcube_plugin
|
|||
$input_value = new html_inputfield(array('name' => '_alarm_value', 'id' => $field_id . 'value', 'size' => 3));
|
||||
$select_offset = new html_select(array('name' => '_alarm_offset', 'id' => $field_id . 'offset'));
|
||||
foreach (array('-M','-H','-D','+M','+H','+D') as $trigger)
|
||||
$select_offset->add(rcube_label('trigger' . $trigger, 'libcalendaring'), $trigger);
|
||||
$select_offset->add($this->gettext('trigger' . $trigger, 'libcalendaring'), $trigger);
|
||||
|
||||
$preset = libcalendaring::parse_alarm_value($this->rc->config->get('calendar_default_alarm_offset', '-15M'));
|
||||
$p['blocks']['view']['options']['alarmoffset'] = array(
|
||||
|
@ -655,13 +655,13 @@ class calendar extends rcube_plugin
|
|||
$select_type = new html_select(array('name' => '_birthdays_alarm_type', 'id' => $field_id) + $input_attrib);
|
||||
$select_type->add($this->gettext('none'), '');
|
||||
foreach ($this->driver->alarm_types as $type) {
|
||||
$select_type->add(rcube_label(strtolower("alarm{$type}option"), 'libcalendaring'), $type);
|
||||
$select_type->add($this->gettext(strtolower("alarm{$type}option"), 'libcalendaring'), $type);
|
||||
}
|
||||
|
||||
$input_value = new html_inputfield(array('name' => '_birthdays_alarm_value', 'id' => $field_id . 'value', 'size' => 3) + $input_attrib);
|
||||
$select_offset = new html_select(array('name' => '_birthdays_alarm_offset', 'id' => $field_id . 'offset') + $input_attrib);
|
||||
foreach (array('-M','-H','-D') as $trigger)
|
||||
$select_offset->add(rcube_label('trigger' . $trigger, 'libcalendaring'), $trigger);
|
||||
$select_offset->add($this->gettext('trigger' . $trigger, 'libcalendaring'), $trigger);
|
||||
|
||||
$preset = libcalendaring::parse_alarm_value($this->rc->config->get('calendar_birthdays_alarm_offset', '-1D'));
|
||||
$p['blocks']['birthdays']['options']['birthdays_alarmoffset'] = array(
|
||||
|
@ -1503,11 +1503,11 @@ class calendar extends rcube_plugin
|
|||
}
|
||||
else {
|
||||
if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) {
|
||||
$msg = rcube_label(array('name' => 'filesizeerror', 'vars' => array(
|
||||
$msg = $this->gettext(array('name' => 'filesizeerror', 'vars' => array(
|
||||
'size' => show_bytes(parse_bytes(ini_get('upload_max_filesize'))))));
|
||||
}
|
||||
else {
|
||||
$msg = rcube_label('fileuploaderror');
|
||||
$msg = $this->gettext('fileuploaderror');
|
||||
}
|
||||
|
||||
$this->rc->output->command('plugin.import_error', array('message' => $msg));
|
||||
|
|
|
@ -2450,7 +2450,7 @@ class kolab_driver extends calendar_driver
|
|||
if (is_array($form['content']) && !empty($form['content'])) {
|
||||
$table = new html_table(array('cols' => 2));
|
||||
foreach ($form['content'] as $col => $colprop) {
|
||||
$label = !empty($colprop['label']) ? $colprop['label'] : rcube_label($col);
|
||||
$label = !empty($colprop['label']) ? $colprop['label'] : $this->rc->gettext($col);
|
||||
|
||||
$table->add('title', html::label($colprop['id'], rcube::Q($label)));
|
||||
$table->add(null, $colprop['value']);
|
||||
|
|
|
@ -504,7 +504,7 @@ class calendar_ui
|
|||
$attrib['id'] = 'rcmImportForm';
|
||||
|
||||
// Get max filesize, enable upload progress bar
|
||||
$max_filesize = rcube_upload_init();
|
||||
$max_filesize = $this->rc->upload_init();
|
||||
|
||||
$accept = '.ics, text/calendar, text/x-vcalendar, application/ics';
|
||||
if (class_exists('ZipArchive', false)) {
|
||||
|
@ -528,7 +528,7 @@ class calendar_ui
|
|||
|
||||
$html .= html::div('form-section',
|
||||
html::div(null, $input->show()) .
|
||||
html::div('hint', rcube_label(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize))))
|
||||
html::div('hint', $this->rc->gettext(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize))))
|
||||
);
|
||||
|
||||
$html .= html::div('form-section',
|
||||
|
@ -607,7 +607,7 @@ class calendar_ui
|
|||
$attrib['id'] = 'rcmUploadForm';
|
||||
|
||||
// Get max filesize, enable upload progress bar
|
||||
$max_filesize = rcube_upload_init();
|
||||
$max_filesize =$this->rc->upload_init();
|
||||
|
||||
$button = new html_inputfield(array('type' => 'button'));
|
||||
$input = new html_inputfield(array(
|
||||
|
|
|
@ -293,7 +293,7 @@ class kolab_addressbook_ui
|
|||
$table = new html_table(array('cols' => 2, 'class' => 'propform'));
|
||||
foreach ($form['content'] as $col => $colprop) {
|
||||
$colprop['id'] = '_'.$col;
|
||||
$label = !empty($colprop['label']) ? $colprop['label'] : rcube_label($col);
|
||||
$label = !empty($colprop['label']) ? $colprop['label'] : $this->rc->gettext($col);
|
||||
|
||||
$table->add('title', sprintf('<label for="%s">%s</label>', $colprop['id'], rcube::Q($label)));
|
||||
$table->add(null, $colprop['value']);
|
||||
|
|
|
@ -111,11 +111,12 @@ class rcube_kolab_contacts extends rcube_addressbook
|
|||
$format = kolab_format::factory('contact');
|
||||
$this->coltypes['phone']['subtypes'] = array_keys($format->phonetypes);
|
||||
$this->coltypes['address']['subtypes'] = array_keys($format->addresstypes);
|
||||
$rcmail = rcmail::get_instance();
|
||||
|
||||
// set localized labels for proprietary cols
|
||||
foreach ($this->coltypes as $col => $prop) {
|
||||
if (is_string($prop['label']))
|
||||
$this->coltypes[$col]['label'] = rcube_label($prop['label']);
|
||||
$this->coltypes[$col]['label'] = $rcmail->gettext($prop['label']);
|
||||
}
|
||||
|
||||
// fetch objects from the given IMAP folder
|
||||
|
|
|
@ -642,7 +642,7 @@ class libcalendaring_itip
|
|||
$metadata['fallback'] = $rsvp_status;
|
||||
$metadata['rsvp'] = intval($metadata['rsvp']);
|
||||
|
||||
$this->rc->output->add_script("rcube_libcalendaring.fetch_itip_object_status(" . json_serialize($metadata) . ")", 'docready');
|
||||
$this->rc->output->add_script("rcube_libcalendaring.fetch_itip_object_status(" . rcube_output::json_serialize($metadata) . ")", 'docready');
|
||||
|
||||
// get localized texts from the right domain
|
||||
foreach (array('savingdata','deleteobjectconfirm','declinedeleteconfirm','declineattendee',
|
||||
|
|
|
@ -435,7 +435,7 @@ class tasklist_ui
|
|||
$attrib['id'] = 'rcmtaskuploadform';
|
||||
|
||||
// Get max filesize, enable upload progress bar
|
||||
$max_filesize = rcube_upload_init();
|
||||
$max_filesize = $this->rc->upload_init();
|
||||
|
||||
$button = new html_inputfield(array('type' => 'button'));
|
||||
$input = new html_inputfield(array(
|
||||
|
|
Loading…
Add table
Reference in a new issue