Merge branch 'master' of ssh://git.kolab.org/diffusion/RPK/roundcubemail-plugins-kolab

Conflicts:
	plugins/calendar/calendar.php
This commit is contained in:
Aleksander Machniak 2015-09-01 10:00:21 +02:00
commit cb3944221f
20 changed files with 102 additions and 102 deletions

View file

@ -369,7 +369,7 @@ class calendar extends rcube_plugin
$select->add($this->gettext('month'), "month"); $select->add($this->gettext('month'), "month");
$select->add($this->gettext('agenda'), "table"); $select->add($this->gettext('agenda'), "table");
$p['blocks']['view']['options']['default_view'] = array( $p['blocks']['view']['options']['default_view'] = array(
'title' => html::label($field_id, Q($this->gettext('default_view'))), 'title' => html::label($field_id, rcube::Q($this->gettext('default_view'))),
'content' => $select->show($this->rc->config->get('calendar_default_view', $this->defaults['calendar_default_view'])), 'content' => $select->show($this->rc->config->get('calendar_default_view', $this->defaults['calendar_default_view'])),
); );
} }
@ -385,7 +385,7 @@ class calendar extends rcube_plugin
$select = new html_select(array('name' => '_timeslots', 'id' => $field_id)); $select = new html_select(array('name' => '_timeslots', 'id' => $field_id));
$select->add($choices); $select->add($choices);
$p['blocks']['view']['options']['timeslots'] = array( $p['blocks']['view']['options']['timeslots'] = array(
'title' => html::label($field_id, Q($this->gettext('timeslots'))), 'title' => html::label($field_id, rcube::Q($this->gettext('timeslots'))),
'content' => $select->show(strval($this->rc->config->get('calendar_timeslots', $this->defaults['calendar_timeslots']))), 'content' => $select->show(strval($this->rc->config->get('calendar_timeslots', $this->defaults['calendar_timeslots']))),
); );
} }
@ -406,7 +406,7 @@ class calendar extends rcube_plugin
$select->add($this->gettext('friday'), '5'); $select->add($this->gettext('friday'), '5');
$select->add($this->gettext('saturday'), '6'); $select->add($this->gettext('saturday'), '6');
$p['blocks']['view']['options']['first_day'] = array( $p['blocks']['view']['options']['first_day'] = array(
'title' => html::label($field_id, Q($this->gettext('first_day'))), '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']))), 'content' => $select->show(strval($this->rc->config->get('calendar_first_day', $this->defaults['calendar_first_day']))),
); );
} }
@ -424,7 +424,7 @@ class calendar extends rcube_plugin
$field_id = 'rcmfd_firsthour'; $field_id = 'rcmfd_firsthour';
$p['blocks']['view']['options']['first_hour'] = array( $p['blocks']['view']['options']['first_hour'] = array(
'title' => html::label($field_id, Q($this->gettext('first_hour'))), 'title' => html::label($field_id, rcube::Q($this->gettext('first_hour'))),
'content' => $select_hours->show($this->rc->config->get('calendar_first_hour', $this->defaults['calendar_first_hour']), array('name' => '_first_hour', 'id' => $field_id)), 'content' => $select_hours->show($this->rc->config->get('calendar_first_hour', $this->defaults['calendar_first_hour']), array('name' => '_first_hour', 'id' => $field_id)),
); );
} }
@ -437,7 +437,7 @@ class calendar extends rcube_plugin
$field_id = 'rcmfd_workstart'; $field_id = 'rcmfd_workstart';
$p['blocks']['view']['options']['workinghours'] = array( $p['blocks']['view']['options']['workinghours'] = array(
'title' => html::label($field_id, Q($this->gettext('workinghours'))), 'title' => html::label($field_id, rcube::Q($this->gettext('workinghours'))),
'content' => $select_hours->show($this->rc->config->get('calendar_work_start', $this->defaults['calendar_work_start']), array('name' => '_work_start', 'id' => $field_id)) . 'content' => $select_hours->show($this->rc->config->get('calendar_work_start', $this->defaults['calendar_work_start']), array('name' => '_work_start', 'id' => $field_id)) .
' — ' . $select_hours->show($this->rc->config->get('calendar_work_end', $this->defaults['calendar_work_end']), array('name' => '_work_end', 'id' => $field_id)), ' — ' . $select_hours->show($this->rc->config->get('calendar_work_end', $this->defaults['calendar_work_end']), array('name' => '_work_end', 'id' => $field_id)),
); );
@ -457,7 +457,7 @@ class calendar extends rcube_plugin
$select_colors->add($this->gettext('coloringmode3'), 3); $select_colors->add($this->gettext('coloringmode3'), 3);
$p['blocks']['view']['options']['eventcolors'] = array( $p['blocks']['view']['options']['eventcolors'] = array(
'title' => html::label($field_id . 'value', Q($this->gettext('eventcoloring'))), 'title' => html::label($field_id . 'value', rcube::Q($this->gettext('eventcoloring'))),
'content' => $select_colors->show($this->rc->config->get('calendar_event_coloring', $this->defaults['calendar_event_coloring'])), 'content' => $select_colors->show($this->rc->config->get('calendar_event_coloring', $this->defaults['calendar_event_coloring'])),
); );
} }
@ -518,7 +518,7 @@ class calendar extends rcube_plugin
$default_calendar = $id; $default_calendar = $id;
} }
$p['blocks']['view']['options']['defaultcalendar'] = array( $p['blocks']['view']['options']['defaultcalendar'] = array(
'title' => html::label($field_id . 'value', Q($this->gettext('defaultcalendar'))), 'title' => html::label($field_id . 'value', rcube::Q($this->gettext('defaultcalendar'))),
'content' => $select_cal->show($this->rc->config->get('calendar_default_calendar', $default_calendar)), 'content' => $select_cal->show($this->rc->config->get('calendar_default_calendar', $default_calendar)),
); );
} }
@ -558,7 +558,7 @@ class calendar extends rcube_plugin
)); ));
$p['blocks']['itip']['options']['after_action'] = array( $p['blocks']['itip']['options']['after_action'] = array(
'title' => html::label($field_id, Q($this->gettext('afteraction'))), 'title' => html::label($field_id, rcube::Q($this->gettext('afteraction'))),
'content' => $select->show($val) . $folders->show($folder), 'content' => $select->show($val) . $folders->show($folder),
); );
} }
@ -916,7 +916,7 @@ class calendar extends rcube_plugin
// display message with Undo link. // display message with Undo link.
$msg = html::span(null, $this->gettext('successremoval')) $msg = html::span(null, $this->gettext('successremoval'))
. ' ' . html::a(array('onclick' => sprintf("%s.http_request('event', 'action=undo', %s.display_message('', 'loading'))", . ' ' . html::a(array('onclick' => sprintf("%s.http_request('event', 'action=undo', %s.display_message('', 'loading'))",
JS_OBJECT_NAME, JS_OBJECT_NAME)), $this->gettext('undo')); rcmail_output::JS_OBJECT_NAME, rcmail_output::JS_OBJECT_NAME)), $this->gettext('undo'));
$this->rc->output->show_message($msg, 'confirmation', null, true, $undo_time); $this->rc->output->show_message($msg, 'confirmation', null, true, $undo_time);
$got_msg = true; $got_msg = true;
} }
@ -2649,7 +2649,7 @@ class calendar extends rcube_plugin
return html::div(rtrim('event-row ' . $class), return html::div(rtrim('event-row ' . $class),
html::span('event-date', $time) . html::span('event-date', $time) .
html::span('event-title', Q($event['title'])) html::span('event-title', rcube::Q($event['title']))
); );
} }
@ -3102,7 +3102,7 @@ class calendar extends rcube_plugin
$uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST); $uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST);
$mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST); $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST);
$mime_id = rcube_utils::get_input_value('_part', rcube_utils::INPUT_POST); $mime_id = rcube_utils::get_input_value('_part', rcube_utils::INPUT_POST);
$charset = RCMAIL_CHARSET; $charset = RCUBE_CHARSET;
// establish imap connection // establish imap connection
$imap = $this->rc->get_storage(); $imap = $this->rc->get_storage();

View file

@ -2388,7 +2388,7 @@ class kolab_driver extends calendar_driver
if ($action != 'form-new') { if ($action != 'form-new') {
$form['sharing'] = array( $form['sharing'] = array(
'name' => Q($this->cal->gettext('tabsharing')), 'name' => rcube::Q($this->cal->gettext('tabsharing')),
'content' => html::tag('iframe', array( 'content' => html::tag('iframe', array(
'src' => $this->cal->rc->url(array('_action' => 'calendar-acl', 'id' => $calendar['id'], 'framed' => 1)), 'src' => $this->cal->rc->url(array('_action' => 'calendar-acl', 'id' => $calendar['id'], 'framed' => 1)),
'width' => '100%', 'width' => '100%',
@ -2414,7 +2414,7 @@ class kolab_driver extends calendar_driver
foreach ($tab['fieldsets'] as $fieldset) { foreach ($tab['fieldsets'] as $fieldset) {
$subcontent = $this->get_form_part($fieldset); $subcontent = $this->get_form_part($fieldset);
if ($subcontent) { if ($subcontent) {
$content .= html::tag('fieldset', null, html::tag('legend', null, Q($fieldset['name'])) . $subcontent) ."\n"; $content .= html::tag('fieldset', null, html::tag('legend', null, rcube::Q($fieldset['name'])) . $subcontent) ."\n";
} }
} }
} }
@ -2423,7 +2423,7 @@ class kolab_driver extends calendar_driver
} }
if ($content) { if ($content) {
$this->form_html .= html::tag('fieldset', null, html::tag('legend', null, Q($tab['name'])) . $content) ."\n"; $this->form_html .= html::tag('fieldset', null, html::tag('legend', null, rcube::Q($tab['name'])) . $content) ."\n";
} }
} }
@ -2452,7 +2452,7 @@ class kolab_driver extends calendar_driver
foreach ($form['content'] as $col => $colprop) { foreach ($form['content'] as $col => $colprop) {
$label = !empty($colprop['label']) ? $colprop['label'] : $this->cal->gettext($col); $label = !empty($colprop['label']) ? $colprop['label'] : $this->cal->gettext($col);
$table->add('title', html::label($colprop['id'], Q($label))); $table->add('title', html::label($colprop['id'], rcube::Q($label)));
$table->add(null, $colprop['value']); $table->add(null, $colprop['value']);
} }
$content = $table->show(); $content = $table->show();

View file

@ -291,7 +291,7 @@ class calendar_ui
$classes = array('calendar', 'cal-' . asciiwords($id, true)); $classes = array('calendar', 'cal-' . asciiwords($id, true));
$title = $prop['title'] ?: ($prop['name'] != $prop['listname'] || strlen($prop['name']) > 25 ? $title = $prop['title'] ?: ($prop['name'] != $prop['listname'] || strlen($prop['name']) > 25 ?
html_entity_decode($prop['name'], ENT_COMPAT, RCMAIL_CHARSET) : ''); html_entity_decode($prop['name'], ENT_COMPAT, RCUBE_CHARSET) : '');
if ($prop['virtual']) if ($prop['virtual'])
$classes[] = 'virtual'; $classes[] = 'virtual';
@ -308,7 +308,7 @@ class calendar_ui
if (!$activeonly || $prop['active']) { if (!$activeonly || $prop['active']) {
$label_id = 'cl:' . $id; $label_id = 'cl:' . $id;
$content = html::div(join(' ', $classes), $content = html::div(join(' ', $classes),
html::span(array('class' => 'calname', 'id' => $label_id, 'title' => $title), $prop['editname'] ? Q($prop['editname']) : $prop['listname']) . html::span(array('class' => 'calname', 'id' => $label_id, 'title' => $title), $prop['editname'] ? rcube::Q($prop['editname']) : $prop['listname']) .
($prop['virtual'] ? '' : ($prop['virtual'] ? '' :
html::tag('input', array('type' => 'checkbox', 'name' => '_cal[]', 'value' => $id, 'checked' => $prop['active'], 'aria-labelledby' => $label_id), '') . html::tag('input', array('type' => 'checkbox', 'name' => '_cal[]', 'value' => $id, 'checked' => $prop['active'], 'aria-labelledby' => $label_id), '') .
html::span('actions', html::span('actions',
@ -617,7 +617,7 @@ class calendar_ui
return html::div($attrib, return html::div($attrib,
html::div(null, $input->show()) . html::div(null, $input->show()) .
html::div('formbuttons', $button->show($this->rc->gettext('upload'), array('class' => 'button mainaction', html::div('formbuttons', $button->show($this->rc->gettext('upload'), array('class' => 'button mainaction',
'onclick' => JS_OBJECT_NAME . ".upload_file(this.form)"))) . 'onclick' => rcmail_output::JS_OBJECT_NAME . ".upload_file(this.form)"))) .
html::div('hint', $this->rc->gettext(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize)))) html::div('hint', $this->rc->gettext(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize))))
); );
} }
@ -790,7 +790,7 @@ class calendar_ui
html::tag('table', array('id' => $attrib['id'] . '-owner', 'style' => 'display:none') + $attrib, html::tag('table', array('id' => $attrib['id'] . '-owner', 'style' => 'display:none') + $attrib,
html::tag('thead', null, html::tag('thead', null,
html::tag('tr', null, html::tag('tr', null,
html::tag('td', array('colspan' => 2), Q($this->cal->gettext('resourceowner'))) html::tag('td', array('colspan' => 2), rcube::Q($this->cal->gettext('resourceowner')))
) )
) . ) .
html::tag('tbody', null, ''), html::tag('tbody', null, ''),

View file

@ -148,7 +148,7 @@ class kolab_activesync extends rcube_plugin
} }
$this->rc->output->command('plugin.activesync_save_complete', array( $this->rc->output->command('plugin.activesync_save_complete', array(
'success' => !$err, 'id' => $imei, 'alias' => Q($devicealias))); 'success' => !$err, 'id' => $imei, 'alias' => rcube::Q($devicealias)));
} }
if ($err) if ($err)

View file

@ -52,7 +52,7 @@ class kolab_activesync_ui
foreach ($devices as $id => $device) { foreach ($devices as $id => $device) {
$name = $device['ALIAS'] ? $device['ALIAS'] : $id; $name = $device['ALIAS'] ? $device['ALIAS'] : $id;
$table->add_row(array('id' => 'rcmrow' . $id)); $table->add_row(array('id' => 'rcmrow' . $id));
$table->add(null, html::span('devicealias', Q($name)) . html::span('devicetype', Q($device['TYPE']))); $table->add(null, html::span('devicealias', rcube::Q($name)) . html::span('devicetype', rcube::Q($device['TYPE'])));
} }
$this->rc->output->add_gui_object('devicelist', $attrib['id']); $this->rc->output->add_gui_object('devicelist', $attrib['id']);
@ -79,8 +79,8 @@ class kolab_activesync_ui
if (!empty($info)) { if (!empty($info)) {
foreach ($info as $key => $value) { foreach ($info as $key => $value) {
if ($value) { if ($value) {
$table->add('title', Q($this->plugin->gettext($key))); $table->add('title', rcube::Q($this->plugin->gettext($key)));
$table->add(null, Q($value)); $table->add(null, rcube::Q($value));
} }
} }
} }
@ -176,7 +176,7 @@ class kolab_activesync_ui
} }
} }
$folder_id = 'rcmf' . html_identifier($folder); $folder_id = 'rcmf' . rcube_utils::html_identifier($folder);
$names[] = $origname; $names[] = $origname;
$classes = array('mailbox'); $classes = array('mailbox');

View file

@ -839,7 +839,7 @@ class kolab_addressbook extends rcube_plugin
$select->add($this->gettext('personalonly'), self::PERSONAL_ONLY); $select->add($this->gettext('personalonly'), self::PERSONAL_ONLY);
$args['blocks']['main']['options']['kolab_addressbook_prio'] = array( $args['blocks']['main']['options']['kolab_addressbook_prio'] = array(
'title' => html::label($field_id, Q($this->gettext('addressbookprio'))), 'title' => html::label($field_id, rcube::Q($this->gettext('addressbookprio'))),
'content' => $select->show($prio), 'content' => $select->show($prio),
); );
} }

View file

@ -173,7 +173,7 @@ class kolab_addressbook_ui
$hidden_fields[] = array('name' => '_source', 'value' => $folder); $hidden_fields[] = array('name' => '_source', 'value' => $folder);
$folder = rcube_charset::convert($folder, RCMAIL_CHARSET, 'UTF7-IMAP'); $folder = rcube_charset::convert($folder, RCUBE_CHARSET, 'UTF7-IMAP');
$storage = $this->rc->get_storage(); $storage = $this->rc->get_storage();
$delim = $storage->get_hierarchy_delimiter(); $delim = $storage->get_hierarchy_delimiter();
@ -213,7 +213,7 @@ class kolab_addressbook_ui
); );
if (!empty($options) && ($options['norename'] || $options['protected'])) { if (!empty($options) && ($options['norename'] || $options['protected'])) {
$foldername = Q(str_replace($delim, ' » ', kolab_storage::object_name($folder))); $foldername = rcube::Q(str_replace($delim, ' » ', kolab_storage::object_name($folder)));
} }
else { else {
$foldername = new html_inputfield(array('name' => '_name', 'id' => '_name', 'size' => 30)); $foldername = new html_inputfield(array('name' => '_name', 'id' => '_name', 'size' => 30));
@ -264,7 +264,7 @@ class kolab_addressbook_ui
foreach ($tab['fieldsets'] as $fieldset) { foreach ($tab['fieldsets'] as $fieldset) {
$subcontent = $this->get_form_part($fieldset); $subcontent = $this->get_form_part($fieldset);
if ($subcontent) { if ($subcontent) {
$content .= html::tag('fieldset', null, html::tag('legend', null, Q($fieldset['name'])) . $subcontent) ."\n"; $content .= html::tag('fieldset', null, html::tag('legend', null, rcube::Q($fieldset['name'])) . $subcontent) ."\n";
} }
} }
} }
@ -273,7 +273,7 @@ class kolab_addressbook_ui
} }
if ($content) { if ($content) {
$out .= html::tag('fieldset', null, html::tag('legend', null, Q($tab['name'])) . $content) ."\n"; $out .= html::tag('fieldset', null, html::tag('legend', null, rcube::Q($tab['name'])) . $content) ."\n";
} }
} }
@ -307,7 +307,7 @@ class kolab_addressbook_ui
$colprop['id'] = '_'.$col; $colprop['id'] = '_'.$col;
$label = !empty($colprop['label']) ? $colprop['label'] : $this->rc->gettext($col); $label = !empty($colprop['label']) ? $colprop['label'] : $this->rc->gettext($col);
$table->add('title', sprintf('<label for="%s">%s</label>', $colprop['id'], Q($label))); $table->add('title', sprintf('<label for="%s">%s</label>', $colprop['id'], rcube::Q($label)));
$table->add(null, $colprop['value']); $table->add(null, $colprop['value']);
} }
$content = $table->show(); $content = $table->show();

View file

@ -361,7 +361,7 @@ class kolab_auth extends rcube_plugin
$input = new html_inputfield(array('name' => '_loginas', 'id' => 'rcmloginas', $input = new html_inputfield(array('name' => '_loginas', 'id' => 'rcmloginas',
'type' => 'text', 'autocomplete' => 'off')); 'type' => 'text', 'autocomplete' => 'off'));
$row = html::tag('tr', null, $row = html::tag('tr', null,
html::tag('td', 'title', html::label('rcmloginas', Q($this->gettext('loginas')))) html::tag('td', 'title', html::label('rcmloginas', rcube::Q($this->gettext('loginas'))))
. html::tag('td', 'input', $input->show(trim(rcube_utils::get_input_value('_loginas', rcube_utils::INPUT_POST)))) . html::tag('td', 'input', $input->show(trim(rcube_utils::get_input_value('_loginas', rcube_utils::INPUT_POST))))
); );
$args['content'] = preg_replace('/<\/tbody>/i', $row . '</tbody>', $args['content']); $args['content'] = preg_replace('/<\/tbody>/i', $row . '</tbody>', $args['content']);
@ -546,7 +546,7 @@ class kolab_auth extends rcube_plugin
$args['abort'] = true; $args['abort'] = true;
$args['error'] = $this->gettext(array( $args['error'] = $this->gettext(array(
'name' => 'loginasnotallowed', 'name' => 'loginasnotallowed',
'vars' => array('user' => Q($loginas)), 'vars' => array('user' => rcube::Q($loginas)),
)); ));
$message = sprintf( $message = sprintf(

View file

@ -404,7 +404,7 @@ class kolab_delegation extends rcube_plugin
foreach ($list as $id => $delegate) { foreach ($list as $id => $delegate) {
$table->add_row(array('id' => 'rcmrow' . $id)); $table->add_row(array('id' => 'rcmrow' . $id));
$table->add(null, Q($delegate)); $table->add(null, rcube::Q($delegate));
} }
$this->rc->output->add_gui_object('delegatelist', $attrib['id']); $this->rc->output->add_gui_object('delegatelist', $attrib['id']);
@ -429,7 +429,7 @@ class kolab_delegation extends rcube_plugin
if ($delegate) { if ($delegate) {
$input = new html_hiddenfield(array('name' => $field_id, 'id' => $field_id, 'size' => 40)); $input = new html_hiddenfield(array('name' => $field_id, 'id' => $field_id, 'size' => 40));
$input = Q($delegate['name']) . $input->show($id); $input = rcube::Q($delegate['name']) . $input->show($id);
$this->rc->output->set_env('active_delegate', $id); $this->rc->output->set_env('active_delegate', $id);
$this->rc->output->command('parent.enable_command','delegate-delete', true); $this->rc->output->command('parent.enable_command','delegate-delete', true);
@ -522,7 +522,7 @@ class kolab_delegation extends rcube_plugin
} }
} }
$folder_id = 'rcmf' . html_identifier($folder); $folder_id = 'rcmf' . rcube_utils::html_identifier($folder);
$names[] = $origname; $names[] = $origname;
$classes = array('mailbox'); $classes = array('mailbox');

View file

@ -464,7 +464,7 @@ class kolab_files_engine
$a_sort_cols = $this->sort_cols; $a_sort_cols = $this->sort_cols;
if (!empty($attrib['optionsmenuicon'])) { if (!empty($attrib['optionsmenuicon'])) {
$onclick = 'return ' . JS_OBJECT_NAME . ".command('menu-open', 'filelistmenu', this, event)"; $onclick = 'return ' . rcmail_output::JS_OBJECT_NAME . ".command('menu-open', 'filelistmenu', this, event)";
$inner = $this->rc->gettext('listoptions'); $inner = $this->rc->gettext('listoptions');
if (is_string($attrib['optionsmenuicon']) && $attrib['optionsmenuicon'] != 'true') { if (is_string($attrib['optionsmenuicon']) && $attrib['optionsmenuicon'] != 'true') {
@ -505,7 +505,7 @@ class kolab_files_engine
if (in_array($col, $a_sort_cols)) { if (in_array($col, $a_sort_cols)) {
$col_name = html::a(array( $col_name = html::a(array(
'href' => "#sort", 'href' => "#sort",
'onclick' => 'return '.JS_OBJECT_NAME.".command('files-sort','".$col."',this)", 'onclick' => 'return ' . rcmail_output::JS_OBJECT_NAME . ".command('files-sort','$col',this)",
'title' => $this->plugin->gettext('sortby') 'title' => $this->plugin->gettext('sortby')
), $col_name); ), $col_name);
} }
@ -1095,7 +1095,7 @@ class kolab_files_engine
$content = html::a(array( $content = html::a(array(
'href' => "#delete", 'href' => "#delete",
'onclick' => sprintf("return %s.command('remove-attachment','rcmfile%s', this)", JS_OBJECT_NAME, $id), 'onclick' => sprintf("return %s.command('remove-attachment','rcmfile%s', this)", rcmail_output::JS_OBJECT_NAME, $id),
'title' => $this->rc->gettext('delete'), 'title' => $this->rc->gettext('delete'),
'class' => 'delete', 'class' => 'delete',
), $button); ), $button);

View file

@ -752,7 +752,7 @@ class kolab_notes extends rcube_plugin
$saved = $folder->save($object, 'note', $note['uid']); $saved = $folder->save($object, 'note', $note['uid']);
if (!$saved) { if (!$saved) {
raise_error(array( rcube::raise_error(array(
'code' => 600, 'type' => 'php', 'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__, 'file' => __FILE__, 'line' => __LINE__,
'message' => "Error saving note object to Kolab server"), 'message' => "Error saving note object to Kolab server"),
@ -1188,7 +1188,7 @@ class kolab_notes extends rcube_plugin
'class' => 'kolabnotesref', 'class' => 'kolabnotesref',
'rel' => $note['uid'] . '@' . $note['list'], 'rel' => $note['uid'] . '@' . $note['list'],
'target' => '_blank', 'target' => '_blank',
), Q($note['title'])); ), rcube::Q($note['title']));
} }
// prepend note links to message body // prepend note links to message body

View file

@ -206,7 +206,7 @@ class kolab_notes_ui
} }
$title = $prop['title'] ?: ($prop['name'] != $prop['listname'] || strlen($prop['name']) > 25 ? $title = $prop['title'] ?: ($prop['name'] != $prop['listname'] || strlen($prop['name']) > 25 ?
html_entity_decode($prop['name'], ENT_COMPAT, RCMAIL_CHARSET) : ''); html_entity_decode($prop['name'], ENT_COMPAT, RCUBE_CHARSET) : '');
$label_id = 'nl:' . $id; $label_id = 'nl:' . $id;
$attr = $prop['virtual'] ? array('tabindex' => '0') : array('href' => $this->rc->url(array('_list' => $id))); $attr = $prop['virtual'] ? array('tabindex' => '0') : array('href' => $this->rc->url(array('_list' => $id)));
@ -352,7 +352,7 @@ class kolab_notes_ui
// add folder ACL tab // add folder ACL tab
if ($action != 'form-new') { if ($action != 'form-new') {
$form['sharing'] = array( $form['sharing'] = array(
'name' => Q($this->plugin->gettext('tabsharing')), 'name' => rcube::Q($this->plugin->gettext('tabsharing')),
'content' => html::tag('iframe', array( 'content' => html::tag('iframe', array(
'src' => $this->rc->url(array('_action' => 'folder-acl', '_folder' => $folder_name, 'framed' => 1)), 'src' => $this->rc->url(array('_action' => 'folder-acl', '_folder' => $folder_name, 'framed' => 1)),
'width' => '100%', 'width' => '100%',
@ -378,7 +378,7 @@ class kolab_notes_ui
foreach ($tab['fields'] as $col => $colprop) { foreach ($tab['fields'] as $col => $colprop) {
$label = !empty($colprop['label']) ? $colprop['label'] : $this->plugin->gettext($col); $label = !empty($colprop['label']) ? $colprop['label'] : $this->plugin->gettext($col);
$table->add('title', html::label($colprop['id'], Q($label))); $table->add('title', html::label($colprop['id'], rcube::Q($label)));
$table->add(null, $colprop['value']); $table->add(null, $colprop['value']);
} }
$content = $table->show(); $content = $table->show();
@ -388,7 +388,7 @@ class kolab_notes_ui
} }
if (!empty($content)) { if (!empty($content)) {
$form_html .= html::tag('fieldset', null, html::tag('legend', null, Q($tab['name'])) . $content) . "\n"; $form_html .= html::tag('fieldset', null, html::tag('legend', null, rcube::Q($tab['name'])) . $content) . "\n";
} }
} }

View file

@ -169,7 +169,7 @@ class kolab_zpush extends rcube_plugin
$this->cache->remove('folders'); $this->cache->remove('folders');
$this->cache->write('folders', $this->folders_meta); $this->cache->write('folders', $this->folders_meta);
$this->rc->output->command('plugin.zpush_save_complete', array('success' => !$err, 'id' => $imei, 'devicealias' => Q($devicealias))); $this->rc->output->command('plugin.zpush_save_complete', array('success' => !$err, 'id' => $imei, 'devicealias' => rcube::Q($devicealias)));
} }
if ($err) if ($err)

View file

@ -49,7 +49,7 @@ class kolab_zpush_ui
foreach ($devices as $id => $device) { foreach ($devices as $id => $device) {
$name = $device['ALIAS'] ? $device['ALIAS'] : $id; $name = $device['ALIAS'] ? $device['ALIAS'] : $id;
$table->add_row(array('id' => 'rcmrow' . $id)); $table->add_row(array('id' => 'rcmrow' . $id));
$table->add(null, html::span('devicealias', Q($name)) . html::span('devicetype', Q($device['TYPE']))); $table->add(null, html::span('devicealias', rcube::Q($name)) . html::span('devicetype', rcube::Q($device['TYPE'])));
} }
$this->rc->output->add_gui_object('devicelist', $attrib['id']); $this->rc->output->add_gui_object('devicelist', $attrib['id']);
@ -150,7 +150,7 @@ class kolab_zpush_ui
$classes[] = $folder_class; $classes[] = $folder_class;
} }
$folder_id = 'rcmf' . html_identifier($folder); $folder_id = 'rcmf' . rcube_utils::html_identifier($folder);
$table->add_row(); $table->add_row();
$table->add('subscription', $checkbox_sync->show('', array('value' => $folder, 'id' => $folder_id))); $table->add('subscription', $checkbox_sync->show('', array('value' => $folder, 'id' => $folder_id)));
@ -160,7 +160,7 @@ class kolab_zpush_ui
else else
$table->add('alarm', ''); $table->add('alarm', '');
$table->add(join(' ', $classes), html::label($folder_id, Q($foldername))); $table->add(join(' ', $classes), html::label($folder_id, rcube::Q($foldername)));
} }
return $table->show(); return $table->show();

View file

@ -103,7 +103,7 @@ class libcalendaring_itip
$message = $this->compose_itip_message($event, $method, $rsvp); $message = $this->compose_itip_message($event, $method, $rsvp);
} }
$mailto = rcube_idn_to_ascii($recipient['email']); $mailto = rcube_utils::idn_to_ascii($recipient['email']);
$headers = $message->headers(); $headers = $message->headers();
$headers['To'] = format_email_recipient($mailto, $recipient['name']); $headers['To'] = format_email_recipient($mailto, $recipient['name']);
@ -212,9 +212,9 @@ class libcalendaring_itip
*/ */
public function compose_itip_message($event, $method, $rsvp = true) public function compose_itip_message($event, $method, $rsvp = true)
{ {
$from = rcube_idn_to_ascii($this->sender['email']); $from = rcube_utils::idn_to_ascii($this->sender['email']);
$from_utf = rcube_utils::idn_to_utf8($from); $from_utf = rcube_utils::idn_to_utf8($from);
$sender = format_email_recipient($from, $this->sender['name']); $sender = format_email_recipient($from, $this->sender['name']);
// truncate list attendees down to the recipient of the iTip Reply. // truncate list attendees down to the recipient of the iTip Reply.
// constraints for a METHOD:REPLY according to RFC 5546 // constraints for a METHOD:REPLY according to RFC 5546
@ -265,8 +265,8 @@ class libcalendaring_itip
$message = new Mail_mime("\r\n"); $message = new Mail_mime("\r\n");
$message->setParam('text_encoding', 'quoted-printable'); $message->setParam('text_encoding', 'quoted-printable');
$message->setParam('head_encoding', 'quoted-printable'); $message->setParam('head_encoding', 'quoted-printable');
$message->setParam('head_charset', RCMAIL_CHARSET); $message->setParam('head_charset', RCUBE_CHARSET);
$message->setParam('text_charset', RCMAIL_CHARSET . ";\r\n format=flowed"); $message->setParam('text_charset', RCUBE_CHARSET . ";\r\n format=flowed");
$message->setContentType('multipart/alternative'); $message->setContentType('multipart/alternative');
// compose common headers array // compose common headers array
@ -286,7 +286,7 @@ class libcalendaring_itip
$ical = libcalendaring::get_ical(); $ical = libcalendaring::get_ical();
$ics = $ical->export(array($event), $method, false, $method == 'REQUEST' && $this->plugin->driver ? array($this->plugin->driver, 'get_attachment_body') : false); $ics = $ical->export(array($event), $method, false, $method == 'REQUEST' && $this->plugin->driver ? array($this->plugin->driver, 'get_attachment_body') : false);
$filename = $event['_type'] == 'task' ? 'todo.ics' : 'event.ics'; $filename = $event['_type'] == 'task' ? 'todo.ics' : 'event.ics';
$message->addAttachment($ics, 'text/calendar', $filename, false, '8bit', '', RCMAIL_CHARSET . "; method=" . $method); $message->addAttachment($ics, 'text/calendar', $filename, false, '8bit', '', RCUBE_CHARSET . "; method=" . $method);
return $message; return $message;
} }
@ -426,7 +426,7 @@ class libcalendaring_itip
$html = html::div('rsvp-status ' . $status_lc, $this->gettext(array( $html = html::div('rsvp-status ' . $status_lc, $this->gettext(array(
'name' => 'attendee' . $status_lc, 'name' => 'attendee' . $status_lc,
'vars' => array( 'vars' => array(
'delegatedto' => Q($event['delegated-to'] ?: ($attendee['delegated-to'] ?: '?')), 'delegatedto' => rcube::Q($event['delegated-to'] ?: ($attendee['delegated-to'] ?: '?')),
) )
))); )));
} }
@ -506,7 +506,7 @@ class libcalendaring_itip
$update_button = html::tag('input', array( $update_button = html::tag('input', array(
'type' => 'button', 'type' => 'button',
'class' => 'button', 'class' => 'button',
'onclick' => "rcube_libcalendaring.add_from_itip_mail('" . JQ($mime_id) . "', '$task')", 'onclick' => "rcube_libcalendaring.add_from_itip_mail('" . rcube::JQ($mime_id) . "', '$task')",
'value' => $this->gettext('updateattendeestatus'), 'value' => $this->gettext('updateattendeestatus'),
)); ));
@ -514,13 +514,13 @@ class libcalendaring_itip
$accept_buttons = html::tag('input', array( $accept_buttons = html::tag('input', array(
'type' => 'button', 'type' => 'button',
'class' => "button accept", 'class' => "button accept",
'onclick' => "rcube_libcalendaring.add_from_itip_mail('" . JQ($mime_id) . "', '$task')", 'onclick' => "rcube_libcalendaring.add_from_itip_mail('" . rcube::JQ($mime_id) . "', '$task')",
'value' => $this->gettext('acceptattendee'), 'value' => $this->gettext('acceptattendee'),
)); ));
$accept_buttons .= html::tag('input', array( $accept_buttons .= html::tag('input', array(
'type' => 'button', 'type' => 'button',
'class' => "button decline", 'class' => "button decline",
'onclick' => "rcube_libcalendaring.decline_attendee_reply('" . JQ($mime_id) . "', '$task')", 'onclick' => "rcube_libcalendaring.decline_attendee_reply('" . rcube::JQ($mime_id) . "', '$task')",
'value' => $this->gettext('declineattendee'), 'value' => $this->gettext('declineattendee'),
)); ));
@ -549,7 +549,7 @@ class libcalendaring_itip
$rsvp_buttons .= html::tag('input', array( $rsvp_buttons .= html::tag('input', array(
'type' => 'button', 'type' => 'button',
'class' => "button $method", 'class' => "button $method",
'onclick' => "rcube_libcalendaring.add_from_itip_mail('" . JQ($mime_id) . "', '$task', '$method', '$dom_id')", 'onclick' => "rcube_libcalendaring.add_from_itip_mail('" . rcube::JQ($mime_id) . "', '$task', '$method', '$dom_id')",
'value' => $this->gettext('itip' . $method), 'value' => $this->gettext('itip' . $method),
)); ));
} }
@ -560,7 +560,7 @@ class libcalendaring_itip
$rsvp_buttons .= html::tag('input', array( $rsvp_buttons .= html::tag('input', array(
'type' => 'button', 'type' => 'button',
'class' => "button preview", 'class' => "button preview",
'onclick' => "rcube_libcalendaring.open_itip_preview('" . JQ($preview_url) . "', '" . JQ($msgref) . "')", 'onclick' => "rcube_libcalendaring.open_itip_preview('" . rcube::JQ($preview_url) . "', '" . rcube::JQ($msgref) . "')",
'value' => $this->gettext('openpreview'), 'value' => $this->gettext('openpreview'),
)); ));
} }
@ -569,7 +569,7 @@ class libcalendaring_itip
$update_button = html::tag('input', array( $update_button = html::tag('input', array(
'type' => 'button', 'type' => 'button',
'class' => 'button', 'class' => 'button',
'onclick' => "rcube_libcalendaring.add_from_itip_mail('" . JQ($mime_id) . "', '$task')", 'onclick' => "rcube_libcalendaring.add_from_itip_mail('" . rcube::JQ($mime_id) . "', '$task')",
'value' => $this->gettext('updatemycopy'), 'value' => $this->gettext('updatemycopy'),
)); ));
@ -577,7 +577,7 @@ class libcalendaring_itip
$import_button = html::tag('input', array( $import_button = html::tag('input', array(
'type' => 'button', 'type' => 'button',
'class' => 'button', 'class' => 'button',
'onclick' => "rcube_libcalendaring.add_from_itip_mail('" . JQ($mime_id) . "', '$task')", 'onclick' => "rcube_libcalendaring.add_from_itip_mail('" . rcube::JQ($mime_id) . "', '$task')",
'value' => $this->gettext('importtocalendar'), 'value' => $this->gettext('importtocalendar'),
)); ));
@ -615,7 +615,7 @@ class libcalendaring_itip
$button_remove = html::tag('input', array( $button_remove = html::tag('input', array(
'type' => 'button', 'type' => 'button',
'class' => 'button', 'class' => 'button',
'onclick' => "rcube_libcalendaring.remove_from_itip(" . rcube_output::json_serialize($event_prop) . ", '$task', '" . JQ($event['title']) . "')", 'onclick' => "rcube_libcalendaring.remove_from_itip(" . rcube_output::json_serialize($event_prop) . ", '$task', '" . rcube::JQ($event['title']) . "')",
'value' => $this->gettext('removefromcalendar'), 'value' => $this->gettext('removefromcalendar'),
)); ));
@ -623,7 +623,7 @@ class libcalendaring_itip
$button_update = html::tag('input', array( $button_update = html::tag('input', array(
'type' => 'button', 'type' => 'button',
'class' => 'button', 'class' => 'button',
'onclick' => "rcube_libcalendaring.add_from_itip_mail('" . JQ($mime_id) . "', '$task')", 'onclick' => "rcube_libcalendaring.add_from_itip_mail('" . rcube::JQ($mime_id) . "', '$task')",
'value' => $this->gettext('updatemycopy'), 'value' => $this->gettext('updatemycopy'),
)); ));
@ -734,14 +734,14 @@ class libcalendaring_itip
{ {
$table = new html_table(array('cols' => 2, 'border' => 0, 'class' => 'calendar-eventdetails')); $table = new html_table(array('cols' => 2, 'border' => 0, 'class' => 'calendar-eventdetails'));
$table->add('ititle', $title); $table->add('ititle', $title);
$table->add('title', Q($event['title'])); $table->add('title', rcube::Q($event['title']));
if ($event['start'] && $event['end']) { if ($event['start'] && $event['end']) {
$table->add('label', $this->gettext('date')); $table->add('label', $this->gettext('date'));
$table->add('date', Q($this->lib->event_date_text($event))); $table->add('date', rcube::Q($this->lib->event_date_text($event)));
} }
else if ($event['due'] && $event['_type'] == 'task') { else if ($event['due'] && $event['_type'] == 'task') {
$table->add('label', $this->gettext('date')); $table->add('label', $this->gettext('date'));
$table->add('date', Q($this->lib->event_date_text($event))); $table->add('date', rcube::Q($this->lib->event_date_text($event)));
} }
if (!empty($event['recurrence_date'])) { if (!empty($event['recurrence_date'])) {
$table->add('label', ''); $table->add('label', '');
@ -753,7 +753,7 @@ class libcalendaring_itip
} }
if ($event['location']) { if ($event['location']) {
$table->add('label', $this->gettext('location')); $table->add('label', $this->gettext('location'));
$table->add('location', Q($event['location'])); $table->add('location', rcube::Q($event['location']));
} }
if ($event['sensitivity'] && $event['sensitivity'] != 'public') { if ($event['sensitivity'] && $event['sensitivity'] != 'public') {
$table->add('label', $this->gettext('sensitivity')); $table->add('label', $this->gettext('sensitivity'));
@ -765,7 +765,7 @@ class libcalendaring_itip
} }
if ($event['comment']) { if ($event['comment']) {
$table->add('label', $this->gettext('comment')); $table->add('label', $this->gettext('comment'));
$table->add('location', Q($event['comment'])); $table->add('location', rcube::Q($event['comment']));
} }
return $table->show(); return $table->show();

View file

@ -310,17 +310,17 @@ class libcalendaring extends rcube_plugin
$time_format = self::to_php_date_format($this->rc->config->get('calendar_time_format', $this->defaults['calendar_time_format'])); $time_format = self::to_php_date_format($this->rc->config->get('calendar_time_format', $this->defaults['calendar_time_format']));
if ($event['allday']) { if ($event['allday']) {
$fromto = format_date($event['start'], $date_format); $fromto = $this->rc->format_date($event['start'], $date_format);
if (($todate = format_date($event['end'], $date_format)) != $fromto) if (($todate = $this->rc->format_date($event['end'], $date_format)) != $fromto)
$fromto .= ' - ' . $todate; $fromto .= ' - ' . $todate;
} }
else if ($duration < 86400 && $event['start']->format('d') == $event['end']->format('d')) { else if ($duration < 86400 && $event['start']->format('d') == $event['end']->format('d')) {
$fromto = format_date($event['start'], $date_format) . ' ' . format_date($event['start'], $time_format) . $fromto = $this->rc->format_date($event['start'], $date_format) . ' ' . $this->rc->format_date($event['start'], $time_format) .
' - ' . format_date($event['end'], $time_format); ' - ' . $this->rc->format_date($event['end'], $time_format);
} }
else { else {
$fromto = format_date($event['start'], $date_format) . ' ' . format_date($event['start'], $time_format) . $fromto = $this->rc->format_date($event['start'], $date_format) . ' ' . $this->rc->format_date($event['start'], $time_format) .
' - ' . format_date($event['end'], $date_format) . ' ' . format_date($event['end'], $time_format); ' - ' . $this->rc->format_date($event['end'], $date_format) . ' ' . $this->rc->format_date($event['end'], $time_format);
} }
// add timezone information // add timezone information
@ -825,7 +825,7 @@ class libcalendaring extends rcube_plugin
$until = $this->gettext(array('name' => 'forntimes', 'vars' => array('nr' => $rrule['COUNT']))); $until = $this->gettext(array('name' => 'forntimes', 'vars' => array('nr' => $rrule['COUNT'])));
} }
else if ($rrule['UNTIL']) { else if ($rrule['UNTIL']) {
$until = $this->gettext('recurrencend') . ' ' . format_date($rrule['UNTIL'], self::to_php_date_format($this->rc->config->get('calendar_date_format', $this->defaults['calendar_date_format']))); $until = $this->gettext('recurrencend') . ' ' . $this->rc->format_date($rrule['UNTIL'], self::to_php_date_format($this->rc->config->get('calendar_date_format', $this->defaults['calendar_date_format'])));
} }
else { else {
$until = $this->gettext('forever'); $until = $this->gettext('forever');
@ -835,7 +835,7 @@ class libcalendaring extends rcube_plugin
if (is_array($rrule['EXDATE']) && !empty($rrule['EXDATE'])) { if (is_array($rrule['EXDATE']) && !empty($rrule['EXDATE'])) {
$format = self::to_php_date_format($this->rc->config->get('calendar_date_format', $this->defaults['calendar_date_format'])); $format = self::to_php_date_format($this->rc->config->get('calendar_date_format', $this->defaults['calendar_date_format']));
$exdates = array_map( $exdates = array_map(
function($dt) use ($format) { return format_date($dt, $format); }, function($dt) use ($format) { return rcmail::get_instance()->format_date($dt, $format); },
array_slice($rrule['EXDATE'], 0, 10) array_slice($rrule['EXDATE'], 0, 10)
); );
$except = '; ' . $this->gettext('except') . ' ' . join(', ', $exdates); $except = '; ' . $this->gettext('except') . ' ' . join(', ', $exdates);
@ -1108,18 +1108,18 @@ class libcalendaring extends rcube_plugin
)); ));
} }
else { else {
$button = Q($this->rc->gettext('delete')); $button = rcube::Q($this->rc->gettext('delete'));
} }
$content = html::a(array( $content = html::a(array(
'href' => "#delete", 'href' => "#delete",
'class' => 'delete', 'class' => 'delete',
'onclick' => sprintf("return %s.remove_from_attachment_list('rcmfile%s')", JS_OBJECT_NAME, $id), 'onclick' => sprintf("return %s.remove_from_attachment_list('rcmfile%s')", rcmail_output::JS_OBJECT_NAME, $id),
'title' => $this->rc->gettext('delete'), 'title' => $this->rc->gettext('delete'),
'aria-label' => $this->rc->gettext('delete') . ' ' . $attachment['name'], 'aria-label' => $this->rc->gettext('delete') . ' ' . $attachment['name'],
), $button); ), $button);
$content .= Q($attachment['name']); $content .= rcube::Q($attachment['name']);
$this->rc->output->command('add2attachment_list', "rcmfile$id", array( $this->rc->output->command('add2attachment_list', "rcmfile$id", array(
'html' => $content, 'html' => $content,
@ -1131,7 +1131,7 @@ class libcalendaring extends rcube_plugin
else { // upload failed else { // upload failed
if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) { if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) {
$msg = $this->rc->gettext(array('name' => 'filesizeerror', 'vars' => array( $msg = $this->rc->gettext(array('name' => 'filesizeerror', 'vars' => array(
'size' => show_bytes(parse_bytes(ini_get('upload_max_filesize')))))); 'size' => $this->rc->show_bytes(parse_bytes(ini_get('upload_max_filesize'))))));
} }
else if ($attachment['error']) { else if ($attachment['error']) {
$msg = $attachment['error']; $msg = $attachment['error'];
@ -1150,7 +1150,7 @@ class libcalendaring extends rcube_plugin
// show filesizeerror instead of fileuploaderror // show filesizeerror instead of fileuploaderror
if ($maxsize = ini_get('post_max_size')) if ($maxsize = ini_get('post_max_size'))
$msg = $this->rc->gettext(array('name' => 'filesizeerror', 'vars' => array( $msg = $this->rc->gettext(array('name' => 'filesizeerror', 'vars' => array(
'size' => show_bytes(parse_bytes($maxsize))))); 'size' => $this->rc->show_bytes(parse_bytes($maxsize)))));
else else
$msg = $this->rc->gettext('fileuploaderror'); $msg = $this->rc->gettext('fileuploaderror');
@ -1208,7 +1208,7 @@ class libcalendaring extends rcube_plugin
// display page, @TODO: support text/plain (and maybe some other text formats) // display page, @TODO: support text/plain (and maybe some other text formats)
if ($mimetype == 'text/html' && empty($_GET['_download'])) { if ($mimetype == 'text/html' && empty($_GET['_download'])) {
$OUTPUT = new rcube_html_page(); $OUTPUT = new rcmail_html_page();
// @TODO: use washtml on $body // @TODO: use washtml on $body
$OUTPUT->write($plugin['body']); $OUTPUT->write($plugin['body']);
} }
@ -1250,7 +1250,7 @@ class libcalendaring extends rcube_plugin
header('Content-Type: text/html; charset=' . RCUBE_CHARSET); header('Content-Type: text/html; charset=' . RCUBE_CHARSET);
print "<html>\n<head>\n" print "<html>\n<head>\n"
. '<meta http-equiv="refresh" content="0; url='.Q($url).'">' . "\n" . '<meta http-equiv="refresh" content="0; url='.rcube::Q($url).'">' . "\n"
. '<meta http-equiv="content-type" content="text/html; charset='.RCUBE_CHARSET.'">' . "\n" . '<meta http-equiv="content-type" content="text/html; charset='.RCUBE_CHARSET.'">' . "\n"
. "</head>\n<body>\n$message\n</body>\n</html>"; . "</head>\n<body>\n$message\n</body>\n</html>";
exit; exit;
@ -1283,21 +1283,21 @@ class libcalendaring extends rcube_plugin
$table = new html_table(array('cols' => $dl_link ? 3 : 2)); $table = new html_table(array('cols' => $dl_link ? 3 : 2));
if (!empty($this->attachment['name'])) { if (!empty($this->attachment['name'])) {
$table->add('title', Q($this->rc->gettext('filename'))); $table->add('title', rcube::Q($this->rc->gettext('filename')));
$table->add('header', Q($this->attachment['name'])); $table->add('header', rcube::Q($this->attachment['name']));
if ($dl_link) { if ($dl_link) {
$table->add('download-link', html::a($dl_url, Q($this->rc->gettext('download')))); $table->add('download-link', html::a($dl_url, rcube::Q($this->rc->gettext('download'))));
} }
} }
if (!empty($this->attachment['mimetype'])) { if (!empty($this->attachment['mimetype'])) {
$table->add('title', Q($this->rc->gettext('type'))); $table->add('title', rcube::Q($this->rc->gettext('type')));
$table->add('header', Q($this->attachment['mimetype'])); $table->add('header', rcube::Q($this->attachment['mimetype']));
} }
if (!empty($this->attachment['size'])) { if (!empty($this->attachment['size'])) {
$table->add('title', Q($this->rc->gettext('filesize'))); $table->add('title', rcube::Q($this->rc->gettext('filesize')));
$table->add('header', Q(show_bytes($this->attachment['size']))); $table->add('header', rcube::Q($this->rc->show_bytes($this->attachment['size'])));
} }
$this->rc->output->set_env('attachment_download_url', $dl_url); $this->rc->output->set_env('attachment_download_url', $dl_url);
@ -1345,7 +1345,7 @@ class libcalendaring extends rcube_plugin
foreach ($this->ical_parts as $mime_id) { foreach ($this->ical_parts as $mime_id) {
$part = $this->ical_message->mime_parts[$mime_id]; $part = $this->ical_message->mime_parts[$mime_id];
$charset = $part->ctype_parameters['charset'] ?: RCMAIL_CHARSET; $charset = $part->ctype_parameters['charset'] ?: RCUBE_CHARSET;
$this->mail_ical_parser->import($this->ical_message->get_part_body($mime_id, true), $charset); $this->mail_ical_parser->import($this->ical_message->get_part_body($mime_id, true), $charset);
// check if the parsed object is an instance of a recurring event/task // check if the parsed object is an instance of a recurring event/task
@ -1384,7 +1384,7 @@ class libcalendaring extends rcube_plugin
*/ */
public function mail_get_itip_object($mbox, $uid, $mime_id, $type = null) public function mail_get_itip_object($mbox, $uid, $mime_id, $type = null)
{ {
$charset = RCMAIL_CHARSET; $charset = RCUBE_CHARSET;
// establish imap connection // establish imap connection
$imap = $this->rc->get_storage(); $imap = $this->rc->get_storage();

View file

@ -77,7 +77,7 @@ class odfviewer extends rcube_plugin
// send webODF viewer page // send webODF viewer page
$html = file_get_contents($this->home . '/odf.html'); $html = file_get_contents($this->home . '/odf.html');
header("Content-Type: text/html; charset=" . RCMAIL_CHARSET); header("Content-Type: text/html; charset=" . RCUBE_CHARSET);
echo strtr($html, array( echo strtr($html, array(
'%%PARAMS%%' => rcube_output::json_serialize($params), '%%PARAMS%%' => rcube_output::json_serialize($params),
'%%viewer.css%%' => $this->asset_path('viewer.css'), '%%viewer.css%%' => $this->asset_path('viewer.css'),

View file

@ -1362,7 +1362,7 @@ class tasklist_kolab_driver extends tasklist_driver
$this->_parse_id($task); $this->_parse_id($task);
$list_id = $task['list']; $list_id = $task['list'];
if (!$list_id || !($folder = $this->get_folder($list_id))) { if (!$list_id || !($folder = $this->get_folder($list_id))) {
raise_error(array( rcube::raise_error(array(
'code' => 600, 'type' => 'php', 'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__, 'file' => __FILE__, 'line' => __LINE__,
'message' => "Invalid list identifer to save taks: " . var_dump($list_id, true)), 'message' => "Invalid list identifer to save taks: " . var_dump($list_id, true)),
@ -1399,7 +1399,7 @@ class tasklist_kolab_driver extends tasklist_driver
$saved = $folder->save($object, 'task', $task['uid']); $saved = $folder->save($object, 'task', $task['uid']);
if (!$saved) { if (!$saved) {
raise_error(array( rcube::raise_error(array(
'code' => 600, 'type' => 'php', 'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__, 'file' => __FILE__, 'line' => __LINE__,
'message' => "Error saving task object to Kolab server"), 'message' => "Error saving task object to Kolab server"),
@ -1657,7 +1657,7 @@ class tasklist_kolab_driver extends tasklist_driver
// add folder ACL tab // add folder ACL tab
if ($action != 'form-new') { if ($action != 'form-new') {
$form['sharing'] = array( $form['sharing'] = array(
'name' => Q($this->plugin->gettext('tabsharing')), 'name' => rcube::Q($this->plugin->gettext('tabsharing')),
'content' => html::tag('iframe', array( 'content' => html::tag('iframe', array(
'src' => $this->rc->url(array('_action' => 'folder-acl', '_folder' => $folder_name, 'framed' => 1)), 'src' => $this->rc->url(array('_action' => 'folder-acl', '_folder' => $folder_name, 'framed' => 1)),
'width' => '100%', 'width' => '100%',
@ -1683,7 +1683,7 @@ class tasklist_kolab_driver extends tasklist_driver
foreach ($tab['fields'] as $col => $colprop) { foreach ($tab['fields'] as $col => $colprop) {
$label = !empty($colprop['label']) ? $colprop['label'] : $this->plugin->gettext($col); $label = !empty($colprop['label']) ? $colprop['label'] : $this->plugin->gettext($col);
$table->add('title', html::label($colprop['id'], Q($label))); $table->add('title', html::label($colprop['id'], rcube::Q($label)));
$table->add(null, $colprop['value']); $table->add(null, $colprop['value']);
} }
$content = $table->show(); $content = $table->show();
@ -1693,7 +1693,7 @@ class tasklist_kolab_driver extends tasklist_driver
} }
if (!empty($content)) { if (!empty($content)) {
$form_html .= html::tag('fieldset', null, html::tag('legend', null, Q($tab['name'])) . $content) . "\n"; $form_html .= html::tag('fieldset', null, html::tag('legend', null, rcube::Q($tab['name'])) . $content) . "\n";
} }
} }

View file

@ -1785,7 +1785,7 @@ class tasklist extends rcube_plugin
$uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST); $uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST);
$mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST); $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST);
$mime_id = rcube_utils::get_input_value('_part', rcube_utils::INPUT_POST); $mime_id = rcube_utils::get_input_value('_part', rcube_utils::INPUT_POST);
$charset = RCMAIL_CHARSET; $charset = RCUBE_CHARSET;
// establish imap connection // establish imap connection
$imap = $this->rc->get_storage(); $imap = $this->rc->get_storage();

View file

@ -256,7 +256,7 @@ class tasklist_ui
$classes = array('tasklist'); $classes = array('tasklist');
$title = $prop['title'] ?: ($prop['name'] != $prop['listname'] || strlen($prop['name']) > 25 ? $title = $prop['title'] ?: ($prop['name'] != $prop['listname'] || strlen($prop['name']) > 25 ?
html_entity_decode($prop['name'], ENT_COMPAT, RCMAIL_CHARSET) : ''); html_entity_decode($prop['name'], ENT_COMPAT, RCUBE_CHARSET) : '');
if ($prop['virtual']) if ($prop['virtual'])
$classes[] = 'virtual'; $classes[] = 'virtual';
@ -448,7 +448,7 @@ class tasklist_ui
return html::div($attrib, return html::div($attrib,
html::div(null, $input->show()) . html::div(null, $input->show()) .
html::div('formbuttons', $button->show($this->rc->gettext('upload'), array('class' => 'button mainaction', html::div('formbuttons', $button->show($this->rc->gettext('upload'), array('class' => 'button mainaction',
'onclick' => JS_OBJECT_NAME . ".upload_file(this.form)"))) . 'onclick' => rcmail_output::JS_OBJECT_NAME . ".upload_file(this.form)"))) .
html::div('hint', $this->rc->gettext(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize)))) html::div('hint', $this->rc->gettext(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize))))
); );
} }