diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php index b3e403af..3b7e76f6 100644 --- a/plugins/calendar/calendar.php +++ b/plugins/calendar/calendar.php @@ -369,7 +369,7 @@ class calendar extends rcube_plugin $select->add($this->gettext('month'), "month"); $select->add($this->gettext('agenda'), "table"); $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'])), ); } @@ -385,7 +385,7 @@ class calendar extends rcube_plugin $select = new html_select(array('name' => '_timeslots', 'id' => $field_id)); $select->add($choices); $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']))), ); } @@ -406,7 +406,7 @@ class calendar extends rcube_plugin $select->add($this->gettext('friday'), '5'); $select->add($this->gettext('saturday'), '6'); $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']))), ); } @@ -424,7 +424,7 @@ class calendar extends rcube_plugin $field_id = 'rcmfd_firsthour'; $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)), ); } @@ -437,7 +437,7 @@ class calendar extends rcube_plugin $field_id = 'rcmfd_workstart'; $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)) . ' — ' . $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); $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'])), ); } @@ -518,7 +518,7 @@ class calendar extends rcube_plugin $default_calendar = $id; } $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)), ); } @@ -558,7 +558,7 @@ class calendar extends rcube_plugin )); $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), ); } @@ -916,7 +916,7 @@ class calendar extends rcube_plugin // display message with Undo link. $msg = html::span(null, $this->gettext('successremoval')) . ' ' . 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); $got_msg = true; } @@ -2649,7 +2649,7 @@ class calendar extends rcube_plugin return html::div(rtrim('event-row ' . $class), 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); $mbox = rcube_utils::get_input_value('_mbox', 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 $imap = $this->rc->get_storage(); diff --git a/plugins/calendar/drivers/kolab/kolab_driver.php b/plugins/calendar/drivers/kolab/kolab_driver.php index 4b17ead1..8f47a457 100644 --- a/plugins/calendar/drivers/kolab/kolab_driver.php +++ b/plugins/calendar/drivers/kolab/kolab_driver.php @@ -2388,7 +2388,7 @@ class kolab_driver extends calendar_driver if ($action != 'form-new') { $form['sharing'] = array( - 'name' => Q($this->cal->gettext('tabsharing')), + 'name' => rcube::Q($this->cal->gettext('tabsharing')), 'content' => html::tag('iframe', array( 'src' => $this->cal->rc->url(array('_action' => 'calendar-acl', 'id' => $calendar['id'], 'framed' => 1)), 'width' => '100%', @@ -2414,7 +2414,7 @@ class kolab_driver extends calendar_driver foreach ($tab['fieldsets'] as $fieldset) { $subcontent = $this->get_form_part($fieldset); 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) { - $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) { $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']); } $content = $table->show(); diff --git a/plugins/calendar/lib/calendar_ui.php b/plugins/calendar/lib/calendar_ui.php index 857e26dc..8d47099f 100644 --- a/plugins/calendar/lib/calendar_ui.php +++ b/plugins/calendar/lib/calendar_ui.php @@ -291,7 +291,7 @@ class calendar_ui $classes = array('calendar', 'cal-' . asciiwords($id, true)); $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']) $classes[] = 'virtual'; @@ -308,7 +308,7 @@ class calendar_ui if (!$activeonly || $prop['active']) { $label_id = 'cl:' . $id; $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'] ? '' : html::tag('input', array('type' => 'checkbox', 'name' => '_cal[]', 'value' => $id, 'checked' => $prop['active'], 'aria-labelledby' => $label_id), '') . html::span('actions', @@ -617,7 +617,7 @@ class calendar_ui return html::div($attrib, html::div(null, $input->show()) . 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)))) ); } @@ -790,7 +790,7 @@ class calendar_ui html::tag('table', array('id' => $attrib['id'] . '-owner', 'style' => 'display:none') + $attrib, html::tag('thead', 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, ''), diff --git a/plugins/kolab_activesync/kolab_activesync.php b/plugins/kolab_activesync/kolab_activesync.php index f886c8d5..80c1052e 100644 --- a/plugins/kolab_activesync/kolab_activesync.php +++ b/plugins/kolab_activesync/kolab_activesync.php @@ -148,7 +148,7 @@ class kolab_activesync extends rcube_plugin } $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) diff --git a/plugins/kolab_activesync/kolab_activesync_ui.php b/plugins/kolab_activesync/kolab_activesync_ui.php index edf64114..5200e4af 100644 --- a/plugins/kolab_activesync/kolab_activesync_ui.php +++ b/plugins/kolab_activesync/kolab_activesync_ui.php @@ -52,7 +52,7 @@ class kolab_activesync_ui foreach ($devices as $id => $device) { $name = $device['ALIAS'] ? $device['ALIAS'] : $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']); @@ -79,8 +79,8 @@ class kolab_activesync_ui if (!empty($info)) { foreach ($info as $key => $value) { if ($value) { - $table->add('title', Q($this->plugin->gettext($key))); - $table->add(null, Q($value)); + $table->add('title', rcube::Q($this->plugin->gettext($key))); + $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; $classes = array('mailbox'); diff --git a/plugins/kolab_addressbook/kolab_addressbook.php b/plugins/kolab_addressbook/kolab_addressbook.php index 7dd23e2c..3b1451d3 100644 --- a/plugins/kolab_addressbook/kolab_addressbook.php +++ b/plugins/kolab_addressbook/kolab_addressbook.php @@ -839,7 +839,7 @@ class kolab_addressbook extends rcube_plugin $select->add($this->gettext('personalonly'), self::PERSONAL_ONLY); $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), ); } diff --git a/plugins/kolab_addressbook/lib/kolab_addressbook_ui.php b/plugins/kolab_addressbook/lib/kolab_addressbook_ui.php index 6fea8d0a..26455cf1 100644 --- a/plugins/kolab_addressbook/lib/kolab_addressbook_ui.php +++ b/plugins/kolab_addressbook/lib/kolab_addressbook_ui.php @@ -173,7 +173,7 @@ class kolab_addressbook_ui $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(); $delim = $storage->get_hierarchy_delimiter(); @@ -213,7 +213,7 @@ class kolab_addressbook_ui ); 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 { $foldername = new html_inputfield(array('name' => '_name', 'id' => '_name', 'size' => 30)); @@ -264,7 +264,7 @@ class kolab_addressbook_ui foreach ($tab['fieldsets'] as $fieldset) { $subcontent = $this->get_form_part($fieldset); 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) { - $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; $label = !empty($colprop['label']) ? $colprop['label'] : $this->rc->gettext($col); - $table->add('title', sprintf('', $colprop['id'], Q($label))); + $table->add('title', sprintf('', $colprop['id'], rcube::Q($label))); $table->add(null, $colprop['value']); } $content = $table->show(); diff --git a/plugins/kolab_auth/kolab_auth.php b/plugins/kolab_auth/kolab_auth.php index ac4cc03a..926c5065 100644 --- a/plugins/kolab_auth/kolab_auth.php +++ b/plugins/kolab_auth/kolab_auth.php @@ -361,7 +361,7 @@ class kolab_auth extends rcube_plugin $input = new html_inputfield(array('name' => '_loginas', 'id' => 'rcmloginas', 'type' => 'text', 'autocomplete' => 'off')); $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)))) ); $args['content'] = preg_replace('/<\/tbody>/i', $row . '', $args['content']); @@ -546,7 +546,7 @@ class kolab_auth extends rcube_plugin $args['abort'] = true; $args['error'] = $this->gettext(array( 'name' => 'loginasnotallowed', - 'vars' => array('user' => Q($loginas)), + 'vars' => array('user' => rcube::Q($loginas)), )); $message = sprintf( diff --git a/plugins/kolab_delegation/kolab_delegation.php b/plugins/kolab_delegation/kolab_delegation.php index c828093c..31e55d34 100644 --- a/plugins/kolab_delegation/kolab_delegation.php +++ b/plugins/kolab_delegation/kolab_delegation.php @@ -404,7 +404,7 @@ class kolab_delegation extends rcube_plugin foreach ($list as $id => $delegate) { $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']); @@ -429,7 +429,7 @@ class kolab_delegation extends rcube_plugin if ($delegate) { $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->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; $classes = array('mailbox'); diff --git a/plugins/kolab_files/lib/kolab_files_engine.php b/plugins/kolab_files/lib/kolab_files_engine.php index 2386cf10..b367a217 100644 --- a/plugins/kolab_files/lib/kolab_files_engine.php +++ b/plugins/kolab_files/lib/kolab_files_engine.php @@ -464,7 +464,7 @@ class kolab_files_engine $a_sort_cols = $this->sort_cols; 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'); if (is_string($attrib['optionsmenuicon']) && $attrib['optionsmenuicon'] != 'true') { @@ -505,7 +505,7 @@ class kolab_files_engine if (in_array($col, $a_sort_cols)) { $col_name = html::a(array( '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') ), $col_name); } @@ -1095,7 +1095,7 @@ class kolab_files_engine $content = html::a(array( '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'), 'class' => 'delete', ), $button); diff --git a/plugins/kolab_notes/kolab_notes.php b/plugins/kolab_notes/kolab_notes.php index 6d17e197..20341359 100644 --- a/plugins/kolab_notes/kolab_notes.php +++ b/plugins/kolab_notes/kolab_notes.php @@ -752,7 +752,7 @@ class kolab_notes extends rcube_plugin $saved = $folder->save($object, 'note', $note['uid']); if (!$saved) { - raise_error(array( + rcube::raise_error(array( 'code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "Error saving note object to Kolab server"), @@ -1188,7 +1188,7 @@ class kolab_notes extends rcube_plugin 'class' => 'kolabnotesref', 'rel' => $note['uid'] . '@' . $note['list'], 'target' => '_blank', - ), Q($note['title'])); + ), rcube::Q($note['title'])); } // prepend note links to message body diff --git a/plugins/kolab_notes/kolab_notes_ui.php b/plugins/kolab_notes/kolab_notes_ui.php index 080a586c..99cce46a 100644 --- a/plugins/kolab_notes/kolab_notes_ui.php +++ b/plugins/kolab_notes/kolab_notes_ui.php @@ -206,7 +206,7 @@ class kolab_notes_ui } $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; $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 if ($action != 'form-new') { $form['sharing'] = array( - 'name' => Q($this->plugin->gettext('tabsharing')), + 'name' => rcube::Q($this->plugin->gettext('tabsharing')), 'content' => html::tag('iframe', array( 'src' => $this->rc->url(array('_action' => 'folder-acl', '_folder' => $folder_name, 'framed' => 1)), 'width' => '100%', @@ -378,7 +378,7 @@ class kolab_notes_ui foreach ($tab['fields'] as $col => $colprop) { $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']); } $content = $table->show(); @@ -388,7 +388,7 @@ class kolab_notes_ui } 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"; } } diff --git a/plugins/kolab_zpush/kolab_zpush.php b/plugins/kolab_zpush/kolab_zpush.php index e9d1170e..6107f2c0 100644 --- a/plugins/kolab_zpush/kolab_zpush.php +++ b/plugins/kolab_zpush/kolab_zpush.php @@ -169,7 +169,7 @@ class kolab_zpush extends rcube_plugin $this->cache->remove('folders'); $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) diff --git a/plugins/kolab_zpush/kolab_zpush_ui.php b/plugins/kolab_zpush/kolab_zpush_ui.php index 0e8e6e9d..780426d9 100644 --- a/plugins/kolab_zpush/kolab_zpush_ui.php +++ b/plugins/kolab_zpush/kolab_zpush_ui.php @@ -49,7 +49,7 @@ class kolab_zpush_ui foreach ($devices as $id => $device) { $name = $device['ALIAS'] ? $device['ALIAS'] : $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']); @@ -150,7 +150,7 @@ class kolab_zpush_ui $classes[] = $folder_class; } - $folder_id = 'rcmf' . html_identifier($folder); + $folder_id = 'rcmf' . rcube_utils::html_identifier($folder); $table->add_row(); $table->add('subscription', $checkbox_sync->show('', array('value' => $folder, 'id' => $folder_id))); @@ -160,7 +160,7 @@ class kolab_zpush_ui else $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(); diff --git a/plugins/libcalendaring/lib/libcalendaring_itip.php b/plugins/libcalendaring/lib/libcalendaring_itip.php index f7feab3a..a36f27cc 100644 --- a/plugins/libcalendaring/lib/libcalendaring_itip.php +++ b/plugins/libcalendaring/lib/libcalendaring_itip.php @@ -103,7 +103,7 @@ class libcalendaring_itip $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['To'] = format_email_recipient($mailto, $recipient['name']); @@ -212,9 +212,9 @@ class libcalendaring_itip */ 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); - $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. // constraints for a METHOD:REPLY according to RFC 5546 @@ -265,8 +265,8 @@ class libcalendaring_itip $message = new Mail_mime("\r\n"); $message->setParam('text_encoding', 'quoted-printable'); $message->setParam('head_encoding', 'quoted-printable'); - $message->setParam('head_charset', RCMAIL_CHARSET); - $message->setParam('text_charset', RCMAIL_CHARSET . ";\r\n format=flowed"); + $message->setParam('head_charset', RCUBE_CHARSET); + $message->setParam('text_charset', RCUBE_CHARSET . ";\r\n format=flowed"); $message->setContentType('multipart/alternative'); // compose common headers array @@ -286,7 +286,7 @@ class libcalendaring_itip $ical = libcalendaring::get_ical(); $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'; - $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; } @@ -426,7 +426,7 @@ class libcalendaring_itip $html = html::div('rsvp-status ' . $status_lc, $this->gettext(array( 'name' => 'attendee' . $status_lc, '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( 'type' => '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'), )); @@ -514,13 +514,13 @@ class libcalendaring_itip $accept_buttons = html::tag('input', array( 'type' => 'button', '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'), )); $accept_buttons .= html::tag('input', array( 'type' => 'button', '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'), )); @@ -549,7 +549,7 @@ class libcalendaring_itip $rsvp_buttons .= html::tag('input', array( 'type' => 'button', '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), )); } @@ -560,7 +560,7 @@ class libcalendaring_itip $rsvp_buttons .= html::tag('input', array( 'type' => 'button', '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'), )); } @@ -569,7 +569,7 @@ class libcalendaring_itip $update_button = html::tag('input', array( 'type' => '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'), )); @@ -577,7 +577,7 @@ class libcalendaring_itip $import_button = html::tag('input', array( 'type' => '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'), )); @@ -615,7 +615,7 @@ class libcalendaring_itip $button_remove = html::tag('input', array( 'type' => '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'), )); @@ -623,7 +623,7 @@ class libcalendaring_itip $button_update = html::tag('input', array( 'type' => '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'), )); @@ -734,14 +734,14 @@ class libcalendaring_itip { $table = new html_table(array('cols' => 2, 'border' => 0, 'class' => 'calendar-eventdetails')); $table->add('ititle', $title); - $table->add('title', Q($event['title'])); + $table->add('title', rcube::Q($event['title'])); if ($event['start'] && $event['end']) { $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') { $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'])) { $table->add('label', ''); @@ -753,7 +753,7 @@ class libcalendaring_itip } if ($event['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') { $table->add('label', $this->gettext('sensitivity')); @@ -765,7 +765,7 @@ class libcalendaring_itip } if ($event['comment']) { $table->add('label', $this->gettext('comment')); - $table->add('location', Q($event['comment'])); + $table->add('location', rcube::Q($event['comment'])); } return $table->show(); diff --git a/plugins/libcalendaring/libcalendaring.php b/plugins/libcalendaring/libcalendaring.php index 07dc23ab..9c9405ce 100644 --- a/plugins/libcalendaring/libcalendaring.php +++ b/plugins/libcalendaring/libcalendaring.php @@ -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'])); if ($event['allday']) { - $fromto = format_date($event['start'], $date_format); - if (($todate = format_date($event['end'], $date_format)) != $fromto) + $fromto = $this->rc->format_date($event['start'], $date_format); + if (($todate = $this->rc->format_date($event['end'], $date_format)) != $fromto) $fromto .= ' - ' . $todate; } 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) . - ' - ' . format_date($event['end'], $time_format); + $fromto = $this->rc->format_date($event['start'], $date_format) . ' ' . $this->rc->format_date($event['start'], $time_format) . + ' - ' . $this->rc->format_date($event['end'], $time_format); } else { - $fromto = format_date($event['start'], $date_format) . ' ' . format_date($event['start'], $time_format) . - ' - ' . format_date($event['end'], $date_format) . ' ' . format_date($event['end'], $time_format); + $fromto = $this->rc->format_date($event['start'], $date_format) . ' ' . $this->rc->format_date($event['start'], $time_format) . + ' - ' . $this->rc->format_date($event['end'], $date_format) . ' ' . $this->rc->format_date($event['end'], $time_format); } // add timezone information @@ -825,7 +825,7 @@ class libcalendaring extends rcube_plugin $until = $this->gettext(array('name' => 'forntimes', 'vars' => array('nr' => $rrule['COUNT']))); } 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 { $until = $this->gettext('forever'); @@ -835,7 +835,7 @@ class libcalendaring extends rcube_plugin 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'])); $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) ); $except = '; ' . $this->gettext('except') . ' ' . join(', ', $exdates); @@ -1108,18 +1108,18 @@ class libcalendaring extends rcube_plugin )); } else { - $button = Q($this->rc->gettext('delete')); + $button = rcube::Q($this->rc->gettext('delete')); } $content = html::a(array( 'href' => "#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'), 'aria-label' => $this->rc->gettext('delete') . ' ' . $attachment['name'], ), $button); - $content .= Q($attachment['name']); + $content .= rcube::Q($attachment['name']); $this->rc->output->command('add2attachment_list', "rcmfile$id", array( 'html' => $content, @@ -1131,7 +1131,7 @@ class libcalendaring extends rcube_plugin else { // upload failed if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) { $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']) { $msg = $attachment['error']; @@ -1150,7 +1150,7 @@ class libcalendaring extends rcube_plugin // show filesizeerror instead of fileuploaderror if ($maxsize = ini_get('post_max_size')) $msg = $this->rc->gettext(array('name' => 'filesizeerror', 'vars' => array( - 'size' => show_bytes(parse_bytes($maxsize))))); + 'size' => $this->rc->show_bytes(parse_bytes($maxsize))))); else $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) if ($mimetype == 'text/html' && empty($_GET['_download'])) { - $OUTPUT = new rcube_html_page(); + $OUTPUT = new rcmail_html_page(); // @TODO: use washtml on $body $OUTPUT->write($plugin['body']); } @@ -1250,7 +1250,7 @@ class libcalendaring extends rcube_plugin header('Content-Type: text/html; charset=' . RCUBE_CHARSET); print "\n\n" - . '' . "\n" + . '' . "\n" . '' . "\n" . "\n\n$message\n\n"; exit; @@ -1283,21 +1283,21 @@ class libcalendaring extends rcube_plugin $table = new html_table(array('cols' => $dl_link ? 3 : 2)); if (!empty($this->attachment['name'])) { - $table->add('title', Q($this->rc->gettext('filename'))); - $table->add('header', Q($this->attachment['name'])); + $table->add('title', rcube::Q($this->rc->gettext('filename'))); + $table->add('header', rcube::Q($this->attachment['name'])); 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'])) { - $table->add('title', Q($this->rc->gettext('type'))); - $table->add('header', Q($this->attachment['mimetype'])); + $table->add('title', rcube::Q($this->rc->gettext('type'))); + $table->add('header', rcube::Q($this->attachment['mimetype'])); } if (!empty($this->attachment['size'])) { - $table->add('title', Q($this->rc->gettext('filesize'))); - $table->add('header', Q(show_bytes($this->attachment['size']))); + $table->add('title', rcube::Q($this->rc->gettext('filesize'))); + $table->add('header', rcube::Q($this->rc->show_bytes($this->attachment['size']))); } $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) { $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); // 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) { - $charset = RCMAIL_CHARSET; + $charset = RCUBE_CHARSET; // establish imap connection $imap = $this->rc->get_storage(); diff --git a/plugins/odfviewer/odfviewer.php b/plugins/odfviewer/odfviewer.php index 5fcde31c..42332e5a 100644 --- a/plugins/odfviewer/odfviewer.php +++ b/plugins/odfviewer/odfviewer.php @@ -77,7 +77,7 @@ class odfviewer extends rcube_plugin // send webODF viewer page $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( '%%PARAMS%%' => rcube_output::json_serialize($params), '%%viewer.css%%' => $this->asset_path('viewer.css'), diff --git a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php index de702677..614799bc 100644 --- a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php +++ b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php @@ -1362,7 +1362,7 @@ class tasklist_kolab_driver extends tasklist_driver $this->_parse_id($task); $list_id = $task['list']; if (!$list_id || !($folder = $this->get_folder($list_id))) { - raise_error(array( + rcube::raise_error(array( 'code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, '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']); if (!$saved) { - raise_error(array( + rcube::raise_error(array( 'code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "Error saving task object to Kolab server"), @@ -1657,7 +1657,7 @@ class tasklist_kolab_driver extends tasklist_driver // add folder ACL tab if ($action != 'form-new') { $form['sharing'] = array( - 'name' => Q($this->plugin->gettext('tabsharing')), + 'name' => rcube::Q($this->plugin->gettext('tabsharing')), 'content' => html::tag('iframe', array( 'src' => $this->rc->url(array('_action' => 'folder-acl', '_folder' => $folder_name, 'framed' => 1)), 'width' => '100%', @@ -1683,7 +1683,7 @@ class tasklist_kolab_driver extends tasklist_driver foreach ($tab['fields'] as $col => $colprop) { $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']); } $content = $table->show(); @@ -1693,7 +1693,7 @@ class tasklist_kolab_driver extends tasklist_driver } 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"; } } diff --git a/plugins/tasklist/tasklist.php b/plugins/tasklist/tasklist.php index e569f218..2fb81c71 100644 --- a/plugins/tasklist/tasklist.php +++ b/plugins/tasklist/tasklist.php @@ -1785,7 +1785,7 @@ class tasklist extends rcube_plugin $uid = rcube_utils::get_input_value('_uid', 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); - $charset = RCMAIL_CHARSET; + $charset = RCUBE_CHARSET; // establish imap connection $imap = $this->rc->get_storage(); diff --git a/plugins/tasklist/tasklist_ui.php b/plugins/tasklist/tasklist_ui.php index ea5a7b20..2a18713f 100644 --- a/plugins/tasklist/tasklist_ui.php +++ b/plugins/tasklist/tasklist_ui.php @@ -256,7 +256,7 @@ class tasklist_ui $classes = array('tasklist'); $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']) $classes[] = 'virtual'; @@ -448,7 +448,7 @@ class tasklist_ui return html::div($attrib, html::div(null, $input->show()) . 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)))) ); }