summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/calendar/calendar.php205
-rw-r--r--plugins/calendar/drivers/kolab/kolab_driver.php4
-rw-r--r--plugins/kolab_activesync/kolab_activesync.php14
-rw-r--r--plugins/kolab_addressbook/kolab_addressbook.php24
-rw-r--r--plugins/kolab_addressbook/lib/kolab_addressbook_ui.php10
-rw-r--r--plugins/kolab_delegation/kolab_delegation.php18
-rw-r--r--plugins/kolab_folders/kolab_folders.php8
-rw-r--r--plugins/kolab_notes/kolab_notes.php24
-rw-r--r--plugins/kolab_notes/kolab_notes_ui.php6
-rw-r--r--plugins/kolab_zpush/kolab_zpush.php14
-rw-r--r--plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php2
-rw-r--r--plugins/tasklist/tasklist.php51
12 files changed, 197 insertions, 183 deletions
diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php
index 7793f34..5794e01 100644
--- a/plugins/calendar/calendar.php
+++ b/plugins/calendar/calendar.php
@@ -311,14 +311,14 @@ class calendar extends rcube_plugin
$this->rc->output->set_env('mscolors', jqueryui::get_color_values());
$this->rc->output->set_env('identities-selector', $this->ui->identity_select(array('id' => 'edit-identities-list', 'aria-label' => $this->gettext('roleorganizer'))));
- $view = get_input_value('view', RCUBE_INPUT_GPC);
+ $view = rcube_utils::get_input_value('view', rcube_utils::INPUT_GPC);
if (in_array($view, array('agendaWeek', 'agendaDay', 'month', 'table')))
$this->rc->output->set_env('view', $view);
- if ($date = get_input_value('date', RCUBE_INPUT_GPC))
+ if ($date = rcube_utils::get_input_value('date', rcube_utils::INPUT_GPC))
$this->rc->output->set_env('date', $date);
- if ($msgref = get_input_value('itip', RCUBE_INPUT_GPC))
+ if ($msgref = rcube_utils::get_input_value('itip', rcube_utils::INPUT_GPC))
$this->rc->output->set_env('itip_events', $this->itip_events($msgref));
$this->rc->output->send("calendar.calendar");
@@ -687,34 +687,36 @@ class calendar extends rcube_plugin
$this->load_driver();
// compose default alarm preset value
- $alarm_offset = get_input_value('_alarm_offset', RCUBE_INPUT_POST);
- $default_alarm = $alarm_offset[0] . intval(get_input_value('_alarm_value', RCUBE_INPUT_POST)) . $alarm_offset[1];
+ $alarm_offset = rcube_utils::get_input_value('_alarm_offset', rcube_utils::INPUT_POST);
+ $alarm_value = rcube_utils::get_input_value('_alarm_value', rcube_utils::INPUT_POST);
+ $default_alarm = $alarm_offset[0] . intval($alarm_value) . $alarm_offset[1];
- $birthdays_alarm_offset = get_input_value('_birthdays_alarm_offset', RCUBE_INPUT_POST);
- $birthdays_alarm_value = $birthdays_alarm_offset[0] . intval(get_input_value('_birthdays_alarm_value', RCUBE_INPUT_POST)) . $birthdays_alarm_offset[1];
+ $birthdays_alarm_offset = rcube_utils::get_input_value('_birthdays_alarm_offset', rcube_utils::INPUT_POST);
+ $birthdays_alarm_value = rcube_utils::get_input_value('_birthdays_alarm_value', rcube_utils::INPUT_POST);
+ $birthdays_alarm_value = $birthdays_alarm_offset[0] . intval($birthdays_alarm_value) . $birthdays_alarm_offset[1];
$p['prefs'] = array(
- 'calendar_default_view' => get_input_value('_default_view', RCUBE_INPUT_POST),
- 'calendar_timeslots' => intval(get_input_value('_timeslots', RCUBE_INPUT_POST)),
- 'calendar_first_day' => intval(get_input_value('_first_day', RCUBE_INPUT_POST)),
- 'calendar_first_hour' => intval(get_input_value('_first_hour', RCUBE_INPUT_POST)),
- 'calendar_work_start' => intval(get_input_value('_work_start', RCUBE_INPUT_POST)),
- 'calendar_work_end' => intval(get_input_value('_work_end', RCUBE_INPUT_POST)),
- 'calendar_event_coloring' => intval(get_input_value('_event_coloring', RCUBE_INPUT_POST)),
- 'calendar_default_alarm_type' => get_input_value('_alarm_type', RCUBE_INPUT_POST),
+ 'calendar_default_view' => rcube_utils::get_input_value('_default_view', rcube_utils::INPUT_POST),
+ 'calendar_timeslots' => intval(rcube_utils::get_input_value('_timeslots', rcube_utils::INPUT_POST)),
+ 'calendar_first_day' => intval(rcube_utils::get_input_value('_first_day', rcube_utils::INPUT_POST)),
+ 'calendar_first_hour' => intval(rcube_utils::get_input_value('_first_hour', rcube_utils::INPUT_POST)),
+ 'calendar_work_start' => intval(rcube_utils::get_input_value('_work_start', rcube_utils::INPUT_POST)),
+ 'calendar_work_end' => intval(rcube_utils::get_input_value('_work_end', rcube_utils::INPUT_POST)),
+ 'calendar_event_coloring' => intval(rcube_utils::get_input_value('_event_coloring', rcube_utils::INPUT_POST)),
+ 'calendar_default_alarm_type' => rcube_utils::get_input_value('_alarm_type', rcube_utils::INPUT_POST),
'calendar_default_alarm_offset' => $default_alarm,
- 'calendar_default_calendar' => get_input_value('_default_calendar', RCUBE_INPUT_POST),
+ 'calendar_default_calendar' => rcube_utils::get_input_value('_default_calendar', rcube_utils::INPUT_POST),
'calendar_date_format' => null, // clear previously saved values
'calendar_time_format' => null,
- 'calendar_contact_birthdays' => get_input_value('_contact_birthdays', RCUBE_INPUT_POST) ? true : false,
- 'calendar_birthday_adressbooks' => (array)get_input_value('_birthday_adressbooks', RCUBE_INPUT_POST),
- 'calendar_birthdays_alarm_type' => get_input_value('_birthdays_alarm_type', RCUBE_INPUT_POST),
+ 'calendar_contact_birthdays' => rcube_utils::get_input_value('_contact_birthdays', rcube_utils::INPUT_POST) ? true : false,
+ 'calendar_birthday_adressbooks' => (array) rcube_utils::get_input_value('_birthday_adressbooks', rcube_utils::INPUT_POST),
+ 'calendar_birthdays_alarm_type' => rcube_utils::get_input_value('_birthdays_alarm_type', rcube_utils::INPUT_POST),
'calendar_birthdays_alarm_offset' => $birthdays_alarm_value ?: null,
- 'calendar_itip_after_action' => intval(get_input_value('_after_action', RCUBE_INPUT_POST)),
+ 'calendar_itip_after_action' => intval(rcube_utils::get_input_value('_after_action', rcube_utils::INPUT_POST)),
);
if ($p['prefs']['calendar_itip_after_action'] == 4) {
- $p['prefs']['calendar_itip_after_action'] = get_input_value('_after_action_folder', RCUBE_INPUT_POST, true);
+ $p['prefs']['calendar_itip_after_action'] = rcube_utils::get_input_value('_after_action_folder', rcube_utils::INPUT_POST, true);
}
// categories
@@ -724,8 +726,8 @@ class calendar extends rcube_plugin
$old_categories[md5($name)] = $name;
}
- $categories = (array) get_input_value('_categories', RCUBE_INPUT_POST);
- $colors = (array) get_input_value('_colors', RCUBE_INPUT_POST);
+ $categories = (array) rcube_utils::get_input_value('_categories', rcube_utils::INPUT_POST);
+ $colors = (array) rcube_utils::get_input_value('_colors', rcube_utils::INPUT_POST);
foreach ($categories as $key => $name) {
$color = preg_replace('/^#/', '', strval($colors[$key]));
@@ -758,8 +760,8 @@ class calendar extends rcube_plugin
*/
function calendar_action()
{
- $action = get_input_value('action', RCUBE_INPUT_GPC);
- $cal = get_input_value('c', RCUBE_INPUT_GPC);
+ $action = rcube_utils::get_input_value('action', rcube_utils::INPUT_GPC);
+ $cal = rcube_utils::get_input_value('c', rcube_utils::INPUT_GPC);
$success = $reload = false;
if (isset($cal['showalarms']))
@@ -787,9 +789,12 @@ class calendar extends rcube_plugin
$this->rc->output->show_message($this->gettext('errorsaving'), 'error');
return;
case "search":
- $results = array();
+ $results = array();
$color_mode = $this->rc->config->get('calendar_event_coloring', $this->defaults['calendar_event_coloring']);
- foreach ((array)$this->driver->search_calendars(get_input_value('q', RCUBE_INPUT_GPC), get_input_value('source', RCUBE_INPUT_GPC)) as $id => $prop) {
+ $query = rcube_utils::get_input_value('q', rcube_utils::INPUT_GPC);
+ $source = rcube_utils::get_input_value('source', rcube_utils::INPUT_GPC);
+
+ foreach ((array) $this->driver->search_calendars($query, $source) as $id => $prop) {
$editname = $prop['editname'];
unset($prop['editname']); // force full name to be displayed
$prop['active'] = false;
@@ -808,7 +813,7 @@ class calendar extends rcube_plugin
if ($this->driver->search_more_results)
$this->rc->output->show_message('autocompletemore', 'info');
- $this->rc->output->command('multi_thread_http_response', $results, get_input_value('_reqid', RCUBE_INPUT_GPC));
+ $this->rc->output->command('multi_thread_http_response', $results, rcube_utils::get_input_value('_reqid', rcube_utils::INPUT_GPC));
return;
}
@@ -831,8 +836,8 @@ class calendar extends rcube_plugin
*/
function event_action()
{
- $action = get_input_value('action', RCUBE_INPUT_GPC);
- $event = get_input_value('e', RCUBE_INPUT_POST, true);
+ $action = rcube_utils::get_input_value('action', rcube_utils::INPUT_GPC);
+ $event = rcube_utils::get_input_value('e', rcube_utils::INPUT_POST, true);
$success = $reload = $got_msg = false;
// don't notify if modifying a recurring instance (really?)
@@ -945,18 +950,21 @@ class calendar extends rcube_plugin
break;
case "rsvp":
- $itip_sending = $this->rc->config->get('calendar_itip_send_option', $this->defaults['calendar_itip_send_option']);
- $status = get_input_value('status', RCUBE_INPUT_GPC);
+ $itip_sending = $this->rc->config->get('calendar_itip_send_option', $this->defaults['calendar_itip_send_option']);
+ $status = rcube_utils::get_input_value('status', rcube_utils::INPUT_GPC);
$reply_comment = $event['comment'];
+
$ev = $this->driver->get_event($event);
$ev['attendees'] = $event['attendees'];
$event = $ev;
if ($success = $this->driver->edit_rsvp($event, $status)) {
- $noreply = intval(get_input_value('noreply', RCUBE_INPUT_GPC)) || $status == 'needs-action' || $itip_sending === 0;
- $reload = $event['calendar'] != $ev['calendar'] ? 2 : 1;
+ $noreply = rcube_utils::get_input_value('noreply', rcube_utils::INPUT_GPC);
+ $noreply = intval($noreply) || $status == 'needs-action' || $itip_sending === 0;
+ $reload = $event['calendar'] != $ev['calendar'] ? 2 : 1;
$organizer = null;
$emails = $this->get_user_emails();
+
foreach ($event['attendees'] as $i => $attendee) {
if ($attendee['role'] == 'ORGANIZER') {
$organizer = $attendee;
@@ -1121,10 +1129,10 @@ class calendar extends rcube_plugin
function load_events()
{
$events = $this->driver->load_events(
- get_input_value('start', RCUBE_INPUT_GET),
- get_input_value('end', RCUBE_INPUT_GET),
- ($query = get_input_value('q', RCUBE_INPUT_GET)),
- get_input_value('source', RCUBE_INPUT_GET)
+ rcube_utils::get_input_value('start', rcube_utils::INPUT_GET),
+ rcube_utils::get_input_value('end', rcube_utils::INPUT_GET),
+ ($query = rcube_utils::get_input_value('q', rcube_utils::INPUT_GET)),
+ rcube_utils::get_input_value('source', rcube_utils::INPUT_GET)
);
echo $this->encode($events, !empty($query));
exit;
@@ -1181,9 +1189,9 @@ class calendar extends rcube_plugin
foreach ($this->driver->list_calendars(true) as $cal) {
$events = $this->driver->load_events(
- get_input_value('start', RCUBE_INPUT_GPC),
- get_input_value('end', RCUBE_INPUT_GPC),
- get_input_value('q', RCUBE_INPUT_GPC),
+ rcube_utils::get_input_value('start', rcube_utils::INPUT_GPC),
+ rcube_utils::get_input_value('end', rcube_utils::INPUT_GPC),
+ rcube_utils::get_input_value('q', rcube_utils::INPUT_GPC),
$cal['id'],
1,
$attr['last']
@@ -1289,7 +1297,7 @@ class calendar extends rcube_plugin
$err = $_FILES['_data']['error'];
if (!$err && $_FILES['_data']['tmp_name']) {
- $calendar = get_input_value('calendar', RCUBE_INPUT_GPC);
+ $calendar = rcube_utils::get_input_value('calendar', rcube_utils::INPUT_GPC);
$rangestart = $_REQUEST['_range'] ? date_create("now -" . intval($_REQUEST['_range']) . " months") : 0;
// extract zip file
@@ -1399,8 +1407,9 @@ class calendar extends rcube_plugin
*/
function export_events($terminate = true)
{
- $start = get_input_value('start', RCUBE_INPUT_GET);
- $end = get_input_value('end', RCUBE_INPUT_GET);
+ $start = rcube_utils::get_input_value('start', rcube_utils::INPUT_GET);
+ $end = rcube_utils::get_input_value('end', rcube_utils::INPUT_GET);
+
if (!isset($start))
$start = 'today -1 year';
if (!is_numeric($start))
@@ -1410,9 +1419,9 @@ class calendar extends rcube_plugin
if (!is_numeric($end))
$end = strtotime($end . ' 23:59:59');
- $event_id = get_input_value('id', RCUBE_INPUT_GET);
- $attachments = get_input_value('attachments', RCUBE_INPUT_GET);
- $calid = $filename = get_input_value('source', RCUBE_INPUT_GET);
+ $event_id = rcube_utils::get_input_value('id', rcube_utils::INPUT_GET);
+ $attachments = rcube_utils::get_input_value('attachments', rcube_utils::INPUT_GET);
+ $calid = $filename = rcube_utils::get_input_value('source', rcube_utils::INPUT_GET);
$calendars = $this->driver->list_calendars();
$events = array();
@@ -1473,7 +1482,7 @@ class calendar extends rcube_plugin
// decode calendar feed hash
$format = 'ics';
- $calhash = get_input_value('_cal', RCUBE_INPUT_GET);
+ $calhash = rcube_utils::get_input_value('_cal', rcube_utils::INPUT_GET);
if (preg_match(($suff_regex = '/\.([a-z0-9]{3,5})$/i'), $calhash, $m)) {
$format = strtolower($m[1]);
$calhash = preg_replace($suff_regex, '', $calhash);
@@ -1693,9 +1702,9 @@ class calendar extends rcube_plugin
return $this->lib->attachment_loading_page();
}
- $event_id = get_input_value('_event', RCUBE_INPUT_GPC);
- $calendar = get_input_value('_cal', RCUBE_INPUT_GPC);
- $id = get_input_value('_id', RCUBE_INPUT_GPC);
+ $event_id = rcube_utils::get_input_value('_event', rcube_utils::INPUT_GPC);
+ $calendar = rcube_utils::get_input_value('_cal', rcube_utils::INPUT_GPC);
+ $id = rcube_utils::get_input_value('_id', rcube_utils::INPUT_GPC);
$event = array('id' => $event_id, 'calendar' => $calendar);
$attachment = $this->driver->get_attachment($id, $event);
@@ -1888,10 +1897,10 @@ class calendar extends rcube_plugin
*/
public function freebusy_status()
{
- $email = get_input_value('email', RCUBE_INPUT_GPC);
- $start = get_input_value('start', RCUBE_INPUT_GPC);
- $end = get_input_value('end', RCUBE_INPUT_GPC);
-
+ $email = rcube_utils::get_input_value('email', rcube_utils::INPUT_GPC);
+ $start = rcube_utils::get_input_value('start', rcube_utils::INPUT_GPC);
+ $end = rcube_utils::get_input_value('end', rcube_utils::INPUT_GPC);
+
// convert dates into unix timestamps
if (!empty($start) && !is_numeric($start)) {
$dts = new DateTime($start, $this->timezone);
@@ -1935,10 +1944,10 @@ class calendar extends rcube_plugin
*/
public function freebusy_times()
{
- $email = get_input_value('email', RCUBE_INPUT_GPC);
- $start = get_input_value('start', RCUBE_INPUT_GPC);
- $end = get_input_value('end', RCUBE_INPUT_GPC);
- $interval = intval(get_input_value('interval', RCUBE_INPUT_GPC));
+ $email = rcube_utils::get_input_value('email', rcube_utils::INPUT_GPC);
+ $start = rcube_utils::get_input_value('start', rcube_utils::INPUT_GPC);
+ $end = rcube_utils::get_input_value('end', rcube_utils::INPUT_GPC);
+ $interval = intval(rcube_utils::get_input_value('interval', rcube_utils::INPUT_GPC));
$strformat = $interval > 60 ? 'Ymd' : 'YmdHis';
// convert dates into unix timestamps
@@ -2012,34 +2021,34 @@ class calendar extends rcube_plugin
));
exit;
}
-
+
/**
* Handler for printing calendars
*/
public function print_view()
{
$title = $this->gettext('print');
-
- $view = get_input_value('view', RCUBE_INPUT_GPC);
+
+ $view = rcube_utils::get_input_value('view', rcube_utils::INPUT_GPC);
if (!in_array($view, array('agendaWeek', 'agendaDay', 'month', 'table')))
$view = 'agendaDay';
-
+
$this->rc->output->set_env('view',$view);
-
- if ($date = get_input_value('date', RCUBE_INPUT_GPC))
+
+ if ($date = rcube_utils::get_input_value('date', rcube_utils::INPUT_GPC))
$this->rc->output->set_env('date', $date);
- if ($range = get_input_value('range', RCUBE_INPUT_GPC))
+ if ($range = rcube_utils::get_input_value('range', rcube_utils::INPUT_GPC))
$this->rc->output->set_env('listRange', intval($range));
if (isset($_REQUEST['sections']))
- $this->rc->output->set_env('listSections', get_input_value('sections', RCUBE_INPUT_GPC));
-
- if ($search = get_input_value('search', RCUBE_INPUT_GPC)) {
+ $this->rc->output->set_env('listSections', rcube_utils::get_input_value('sections', rcube_utils::INPUT_GPC));
+
+ if ($search = rcube_utils::get_input_value('search', rcube_utils::INPUT_GPC)) {
$this->rc->output->set_env('search', $search);
$title .= ' "' . $search . '"';
}
-
+
// Add CSS stylesheets to the page header
$skin_path = $this->local_skin_path();
$this->include_stylesheet($skin_path . '/fullcalendar.css');
@@ -2192,8 +2201,8 @@ class calendar extends rcube_plugin
if ($directory = $this->resources_directory()) {
$events = $directory->get_resource_calendar(
rcube_utils::get_input_value('_id', rcube_utils::INPUT_GPC),
- rcube_utils::get_input_value('start', RCUBE_INPUT_GET),
- rcube_utils::get_input_value('end', RCUBE_INPUT_GET));
+ rcube_utils::get_input_value('start', rcube_utils::INPUT_GET),
+ rcube_utils::get_input_value('end', rcube_utils::INPUT_GET));
}
echo $this->encode($events);
@@ -2208,7 +2217,7 @@ class calendar extends rcube_plugin
*/
function event_itip_status()
{
- $data = get_input_value('data', RCUBE_INPUT_POST, true);
+ $data = rcube_utils::get_input_value('data', rcube_utils::INPUT_POST, true);
// find local copy of the referenced event
$this->load_driver();
@@ -2282,12 +2291,13 @@ class calendar extends rcube_plugin
function event_itip_remove()
{
$success = false;
+ $uid = rcube_utils::get_input_value('uid', rcube_utils::INPUT_POST);
// search for event if only UID is given
- if ($event = $this->driver->get_event(array('uid' => get_input_value('uid', RCUBE_INPUT_POST)), true)) {
+ if ($event = $this->driver->get_event(array('uid' => $uid), true)) {
$success = $this->driver->remove_event($event, true);
}
-
+
if ($success) {
$this->rc->output->show_message('calendar.successremoval', 'confirmation');
}
@@ -2308,9 +2318,9 @@ class calendar extends rcube_plugin
$this->rc->output->set_env('refresh_interval', 0);
$this->rc->output->set_pagetitle($this->gettext('calendar'));
- $itip = $this->load_itip();
- $token = get_input_value('_t', RCUBE_INPUT_GPC);
-
+ $itip = $this->load_itip();
+ $token = rcube_utils::get_input_value('_t', rcube_utils::INPUT_GPC);
+
// read event info stored under the given token
if ($invitation = $itip->get_invitation($token)) {
$this->token = $token;
@@ -2502,12 +2512,13 @@ class calendar extends rcube_plugin
{
$itip_sending = $this->rc->config->get('calendar_itip_send_option', $this->defaults['calendar_itip_send_option']);
- $uid = get_input_value('_uid', RCUBE_INPUT_POST);
- $mbox = get_input_value('_mbox', RCUBE_INPUT_POST);
- $mime_id = get_input_value('_part', RCUBE_INPUT_POST);
- $status = get_input_value('_status', RCUBE_INPUT_POST);
- $delete = intval(get_input_value('_del', RCUBE_INPUT_POST));
- $noreply = intval(get_input_value('_noreply', RCUBE_INPUT_POST)) || $status == 'needs-action' || $itip_sending === 0;
+ $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);
+ $status = rcube_utils::get_input_value('_status', rcube_utils::INPUT_POST);
+ $delete = intval(rcube_utils::get_input_value('_del', rcube_utils::INPUT_POST));
+ $noreply = intval(rcube_utils::get_input_value('_noreply', rcube_utils::INPUT_POST));
+ $noreply = $noreply || $status == 'needs-action' || $itip_sending === 0;
$error_msg = $this->gettext('errorimportingevent');
$success = false;
@@ -2515,7 +2526,7 @@ class calendar extends rcube_plugin
// successfully parsed events?
if ($event = $this->lib->mail_get_itip_object($mbox, $uid, $mime_id, 'event')) {
// find writeable calendar to store event
- $cal_id = !empty($_REQUEST['_folder']) ? get_input_value('_folder', RCUBE_INPUT_POST) : null;
+ $cal_id = !empty($_REQUEST['_folder']) ? rcube_utils::get_input_value('_folder', rcube_utils::INPUT_POST) : null;
$dontsave = ($_REQUEST['_folder'] === '' && $event['_method'] == 'REQUEST');
$calendars = $this->driver->list_calendars(false, true);
$calendar = $calendars[$cal_id];
@@ -2681,7 +2692,7 @@ class calendar extends rcube_plugin
// send iTip reply
if ($event['_method'] == 'REQUEST' && $organizer && !$noreply && !in_array(strtolower($organizer['email']), $emails) && !$error_msg) {
- $event['comment'] = get_input_value('_comment', RCUBE_INPUT_POST);
+ $event['comment'] = rcube_utils::get_input_value('_comment', rcube_utils::INPUT_POST);
$itip = $this->load_itip();
$itip->set_sender_email($reply_sender);
if ($itip->send_itip_message($event, 'REPLY', $organizer, 'itipsubject' . $status, 'itipmailbody' . $status))
@@ -2699,12 +2710,12 @@ class calendar extends rcube_plugin
*/
function mail_itip_decline_reply()
{
- $uid = get_input_value('_uid', RCUBE_INPUT_POST);
- $mbox = get_input_value('_mbox', RCUBE_INPUT_POST);
- $mime_id = get_input_value('_part', RCUBE_INPUT_POST);
+ $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);
if (($event = $this->lib->mail_get_itip_object($mbox, $uid, $mime_id, 'event')) && $event['_method'] == 'REPLY') {
- $event['comment'] = get_input_value('_comment', RCUBE_INPUT_POST);
+ $event['comment'] = rcube_utils::get_input_value('_comment', rcube_utils::INPUT_POST);
foreach ($event['attendees'] as $_attendee) {
if ($_attendee['role'] != 'ORGANIZER') {
@@ -2729,9 +2740,9 @@ class calendar extends rcube_plugin
*/
public function mail_import_attachment()
{
- $uid = get_input_value('_uid', RCUBE_INPUT_POST);
- $mbox = get_input_value('_mbox', RCUBE_INPUT_POST);
- $mime_id = get_input_value('_part', RCUBE_INPUT_POST);
+ $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;
// establish imap connection
@@ -2752,7 +2763,7 @@ class calendar extends rcube_plugin
$success = $existing = 0;
if (!empty($events)) {
// find writeable calendar to store event
- $cal_id = !empty($_REQUEST['_calendar']) ? get_input_value('_calendar', RCUBE_INPUT_POST) : null;
+ $cal_id = !empty($_REQUEST['_calendar']) ? rcube_utils::get_input_value('_calendar', rcube_utils::INPUT_POST) : null;
$calendars = $this->driver->list_calendars(false, true);
foreach ($events as $event) {
@@ -2790,10 +2801,10 @@ class calendar extends rcube_plugin
*/
public function mail_message2event()
{
- $uid = get_input_value('_uid', RCUBE_INPUT_POST);
- $mbox = get_input_value('_mbox', RCUBE_INPUT_POST);
+ $uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST);
+ $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST);
$event = array();
-
+
// establish imap connection
$imap = $this->rc->get_storage();
$imap->set_mailbox($mbox);
diff --git a/plugins/calendar/drivers/kolab/kolab_driver.php b/plugins/calendar/drivers/kolab/kolab_driver.php
index 8b38d71..da653d2 100644
--- a/plugins/calendar/drivers/kolab/kolab_driver.php
+++ b/plugins/calendar/drivers/kolab/kolab_driver.php
@@ -1295,7 +1295,7 @@ class kolab_driver extends calendar_driver
set_time_limit(0);
ignore_user_abort(true);
- $cal = get_input_value('source', RCUBE_INPUT_GPC);
+ $cal = rcube_utils::get_input_value('source', rcube_utils::INPUT_GPC);
if (!($cal = $this->get_calendar($cal)))
return false;
@@ -1751,7 +1751,7 @@ class kolab_driver extends calendar_driver
*/
public function calendar_acl_form()
{
- $calid = get_input_value('_id', RCUBE_INPUT_GPC);
+ $calid = rcube_utils::get_input_value('_id', rcube_utils::INPUT_GPC);
if ($calid && ($cal = $this->get_calendar($calid))) {
$folder = $cal->get_realname(); // UTF7
$color = $cal->get_color();
diff --git a/plugins/kolab_activesync/kolab_activesync.php b/plugins/kolab_activesync/kolab_activesync.php
index dc36383..b28e7cd 100644
--- a/plugins/kolab_activesync/kolab_activesync.php
+++ b/plugins/kolab_activesync/kolab_activesync.php
@@ -123,15 +123,15 @@ class kolab_activesync extends rcube_plugin
*/
public function json_command()
{
- $cmd = get_input_value('cmd', RCUBE_INPUT_POST);
- $imei = get_input_value('id', RCUBE_INPUT_POST);
+ $cmd = rcube_utils::get_input_value('cmd', rcube_utils::INPUT_POST);
+ $imei = rcube_utils::get_input_value('id', rcube_utils::INPUT_POST);
switch ($cmd) {
case 'save':
$devices = $this->list_devices();
$device = $devices[$imei];
- $subscriptions = (array) get_input_value('subscribed', RCUBE_INPUT_POST);
- $devicealias = get_input_value('devicealias', RCUBE_INPUT_POST, true);
+ $subscriptions = (array) rcube_utils::get_input_value('subscribed', rcube_utils::INPUT_POST);
+ $devicealias = rcube_utils::get_input_value('devicealias', rcube_utils::INPUT_POST, true);
$device['ALIAS'] = $devicealias;
$err = !$this->device_update($device, $imei);
@@ -173,8 +173,8 @@ class kolab_activesync extends rcube_plugin
break;
case 'update':
- $subscription = (int) get_input_value('flag', RCUBE_INPUT_POST);
- $folder = get_input_value('folder', RCUBE_INPUT_POST);
+ $subscription = (int) rcube_utils::get_input_value('flag', rcube_utils::INPUT_POST);
+ $folder = rcube_utils::get_input_value('folder', rcube_utils::INPUT_POST);
$err = !$this->folder_set($folder, $imei, $subscription);
@@ -233,7 +233,7 @@ class kolab_activesync extends rcube_plugin
$this->register_handler('plugin.deviceconfigform', array($this->ui, 'device_config_form'));
$this->register_handler('plugin.foldersubscriptions', array($this->ui, 'folder_subscriptions'));
- $imei = get_input_value('_id', RCUBE_INPUT_GPC);
+ $imei = rcube_utils::get_input_value('_id', rcube_utils::INPUT_GPC);
$devices = $this->list_devices();
if ($device = $devices[$imei]) {
diff --git a/plugins/kolab_addressbook/kolab_addressbook.php b/plugins/kolab_addressbook/kolab_addressbook.php
index 25bd910..13a32e6 100644
--- a/plugins/kolab_addressbook/kolab_addressbook.php
+++ b/plugins/kolab_addressbook/kolab_addressbook.php
@@ -239,7 +239,7 @@ class kolab_addressbook extends rcube_plugin
*/
protected function addressbook_list_item($id, $source, &$jsdata, $search_mode = false)
{
- $folder = $this->folders[$id];
+ $folder = $this->folders[$id];
$current = rcube_utils::get_input_value('_source', rcube_utils::INPUT_GPC);
if (!$source['virtual']) {
@@ -564,7 +564,7 @@ class kolab_addressbook extends rcube_plugin
$key = 'kolab_addressbook_prio';
if (!in_array('kolab_addressbook_prio', $dont_override) || !isset($_POST['_'.$key])) {
- $args['prefs'][$key] = (int) get_input_value('_'.$key, RCUBE_INPUT_POST);
+ $args['prefs'][$key] = (int) rcube_utils::get_input_value('_'.$key, rcube_utils::INPUT_POST);
}
return $args;
@@ -576,7 +576,7 @@ class kolab_addressbook extends rcube_plugin
*/
public function book_actions()
{
- $action = trim(get_input_value('_act', RCUBE_INPUT_GPC));
+ $action = trim(rcube_utils::get_input_value('_act', rcube_utils::INPUT_GPC));
if ($action == 'create') {
$this->ui->book_edit();
@@ -596,9 +596,9 @@ class kolab_addressbook extends rcube_plugin
public function book_save()
{
$prop = array(
- 'name' => trim(get_input_value('_name', RCUBE_INPUT_POST)),
- 'oldname' => trim(get_input_value('_oldname', RCUBE_INPUT_POST, true)), // UTF7-IMAP
- 'parent' => trim(get_input_value('_parent', RCUBE_INPUT_POST, true)), // UTF7-IMAP
+ 'name' => trim(rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST)),
+ 'oldname' => trim(rcube_utils::get_input_value('_oldname', rcube_utils::INPUT_POST, true)), // UTF7-IMAP
+ 'parent' => trim(rcube_utils::get_input_value('_parent', rcube_utils::INPUT_POST, true)), // UTF7-IMAP
'type' => 'contact',
'subscribed' => true,
);
@@ -649,14 +649,14 @@ class kolab_addressbook extends rcube_plugin
public function book_search()
{
$results = array();
- $query = rcube_utils::get_input_value('q', RCUBE_INPUT_GPC);
- $source = rcube_utils::get_input_value('source', RCUBE_INPUT_GPC);
+ $query = rcube_utils::get_input_value('q', rcube_utils::INPUT_GPC);
+ $source = rcube_utils::get_input_value('source', rcube_utils::INPUT_GPC);
kolab_storage::$encode_ids = true;
$search_more_results = false;
$this->sources = array();
$this->folders = array();
-
+
// find unsubscribed IMAP folders that have "event" type
if ($source == 'folders') {
foreach ((array)kolab_storage::search_folders('contact', $query, array('other')) as $folder) {
@@ -728,7 +728,7 @@ class kolab_addressbook extends rcube_plugin
$this->rc->output->show_message('autocompletemore', 'info');
}
- $this->rc->output->command('multi_thread_http_response', $results, rcube_utils::get_input_value('_reqid', RCUBE_INPUT_GPC));
+ $this->rc->output->command('multi_thread_http_response', $results, rcube_utils::get_input_value('_reqid', rcube_utils::INPUT_GPC));
}
/**
@@ -737,7 +737,7 @@ class kolab_addressbook extends rcube_plugin
public function book_subscribe()
{
$success = false;
- $id = rcube_utils::get_input_value('_source', RCUBE_INPUT_GPC);
+ $id = rcube_utils::get_input_value('_source', rcube_utils::INPUT_GPC);
if ($id && ($folder = kolab_storage::get_folder(kolab_storage::id_decode($id)))) {
if (isset($_POST['_permanent']))
@@ -773,7 +773,7 @@ class kolab_addressbook extends rcube_plugin
*/
private function book_delete()
{
- $folder = trim(get_input_value('_source', RCUBE_INPUT_GPC, true, 'UTF7-IMAP'));
+ $folder = trim(rcube_utils::get_input_value('_source', rcube_utils::INPUT_GPC, true, 'UTF7-IMAP'));
if (kolab_storage::folder_delete($folder)) {
$storage = $this->rc->get_storage();
diff --git a/plugins/kolab_addressbook/lib/kolab_addressbook_ui.php b/plugins/kolab_addressbook/lib/kolab_addressbook_ui.php
index e8f7c03..e154c75 100644
--- a/plugins/kolab_addressbook/lib/kolab_addressbook_ui.php
+++ b/plugins/kolab_addressbook/lib/kolab_addressbook_ui.php
@@ -133,8 +133,8 @@ class kolab_addressbook_ui
*/
public function book_form($attrib)
{
- $action = trim(get_input_value('_act', RCUBE_INPUT_GPC));
- $folder = trim(get_input_value('_source', RCUBE_INPUT_GPC, true)); // UTF8
+ $action = trim(rcube:utils::get_input_value('_act', rcube_utils::INPUT_GPC));
+ $folder = trim(rcube:utils::get_input_value('_source', rcube_utils::INPUT_GPC, true)); // UTF8
$hidden_fields[] = array('name' => '_source', 'value' => $folder);
@@ -144,9 +144,9 @@ class kolab_addressbook_ui
if ($this->rc->action == 'plugin.book-save') {
// save error
- $name = trim(get_input_value('_name', RCUBE_INPUT_GPC, true)); // UTF8
- $old = trim(get_input_value('_oldname', RCUBE_INPUT_GPC, true)); // UTF7-IMAP
- $path_imap = trim(get_input_value('_parent', RCUBE_INPUT_GPC, true)); // UTF7-IMAP
+ $name = trim(rcube:utils::get_input_value('_name', rcube_utils::INPUT_GPC, true)); // UTF8
+ $old = trim(rcube:utils::get_input_value('_oldname', rcube_utils::INPUT_GPC, true)); // UTF7-IMAP
+ $path_imap = trim(rcube:utils::get_input_value('_parent', rcube_utils::INPUT_GPC, true)); // UTF7-IMAP
$hidden_fields[] = array('name' => '_oldname', 'value' => $old);
diff --git a/plugins/kolab_delegation/kolab_delegation.php b/plugins/kolab_delegation/kolab_delegation.php
index a43fb5d..8596009 100644
--- a/plugins/kolab_delegation/kolab_delegation.php
+++ b/plugins/kolab_delegation/kolab_delegation.php
@@ -327,8 +327,8 @@ class kolab_delegation extends rcube_plugin
// Delegate delete
if ($this->rc->action == 'plugin.delegation-delete') {
- $id = get_input_value('id', RCUBE_INPUT_GPC);
- $success = $engine->delegate_delete($id, (bool) get_input_value('acl', RCUBE_INPUT_GPC));
+ $id = rcube_utils::get_input_value('id', rcube_utils::INPUT_GPC);
+ $success = $engine->delegate_delete($id, (bool) rcube_utils::get_input_value('acl', rcube_utils::INPUT_GPC));
if ($success) {
$this->rc->output->show_message($this->gettext('deletesuccess'), 'confirmation');
@@ -340,8 +340,8 @@ class kolab_delegation extends rcube_plugin
}
// Delegate add/update
else if ($this->rc->action == 'plugin.delegation-save') {
- $id = get_input_value('id', RCUBE_INPUT_GPC);
- $acl = get_input_value('folders', RCUBE_INPUT_GPC);
+ $id = rcube_utils::get_input_value('id', rcube_utils::INPUT_GPC);
+ $acl = rcube_utils::get_input_value('folders', rcube_utils::INPUT_GPC);
// update
if ($id) {
@@ -358,7 +358,7 @@ class kolab_delegation extends rcube_plugin
}
// new
else {
- $login = get_input_value('newid', RCUBE_INPUT_GPC);
+ $login = rcube_utils::get_input_value('newid', rcube_utils::INPUT_GPC);
$delegate = $engine->delegate_get_by_name($login);
$success = $engine->delegate_add($delegate, $acl);
@@ -376,8 +376,8 @@ class kolab_delegation extends rcube_plugin
}
// Delegate autocompletion
else if ($this->rc->action == 'plugin.delegation-autocomplete') {
- $search = get_input_value('_search', RCUBE_INPUT_GPC, true);
- $reqid = get_input_value('_reqid', RCUBE_INPUT_GPC);
+ $search = rcube_utils::get_input_value('_search', rcube_utils::INPUT_GPC, true);
+ $reqid = rcube_utils::get_input_value('_reqid', rcube_utils::INPUT_GPC);
$users = $engine->list_users($search);
$this->rc->output->command('ksearch_query_results', $users, $search, $reqid);
@@ -418,7 +418,7 @@ class kolab_delegation extends rcube_plugin
{
$engine = $this->engine();
$table = new html_table(array('cols' => 2));
- $id = get_input_value('_id', RCUBE_INPUT_GPC);
+ $id = rcube_utils::get_input_value('_id', rcube_utils::INPUT_GPC);
$field_id = 'delegate';
if ($id) {
@@ -457,7 +457,7 @@ class kolab_delegation extends rcube_plugin
}
$engine = $this->engine();
- $id = get_input_value('_id', RCUBE_INPUT_GPC);
+ $id = rcube_utils::get_input_value('_id', rcube_utils::INPUT_GPC);
if ($id) {
$delegate = $engine->delegate_get($id);
diff --git a/plugins/kolab_folders/kolab_folders.php b/plugins/kolab_folders/kolab_folders.php
index 2acf5c5..b3c2e8e 100644
--- a/plugins/kolab_folders/kolab_folders.php
+++ b/plugins/kolab_folders/kolab_folders.php
@@ -212,8 +212,8 @@ class kolab_folders extends rcube_plugin
$mbox = strlen($args['name']) ? $args['name'] : $args['parent_name'];
if (isset($_POST['_ctype'])) {
- $new_ctype = trim(get_input_value('_ctype', RCUBE_INPUT_POST));
- $new_subtype = trim(get_input_value('_subtype', RCUBE_INPUT_POST));
+ $new_ctype = trim(rcube_utils::get_input_value('_ctype', rcube_utils::INPUT_POST));
+ $new_subtype = trim(rcube_utils::get_input_value('_subtype', rcube_utils::INPUT_POST));
}
// Get type of the folder or the parent
@@ -301,8 +301,8 @@ class kolab_folders extends rcube_plugin
}
// Folder create/update with form
- $ctype = trim(get_input_value('_ctype', RCUBE_INPUT_POST));
- $subtype = trim(get_input_value('_subtype', RCUBE_INPUT_POST));
+ $ctype = trim(rcube_utils::get_input_value('_ctype', rcube_utils::INPUT_POST));
+ $subtype = trim(rcube_utils::get_input_value('_subtype', rcube_utils::INPUT_POST));
$mbox = $args['record']['name'];
$old_mbox = $args['record']['oldname'];
$subscribe = $args['record']['subscribe'];
diff --git a/plugins/kolab_notes/kolab_notes.php b/plugins/kolab_notes/kolab_notes.php
index 9637be2..259f26d 100644
--- a/plugins/kolab_notes/kolab_notes.php
+++ b/plugins/kolab_notes/kolab_notes.php
@@ -387,7 +387,7 @@ class kolab_notes extends rcube_plugin
public function dialog_view()
{
// resolve message reference
- if ($msgref = rcube_utils::get_input_value('_msg', RCUBE_INPUT_GPC, true)) {
+ if ($msgref = rcube_utils::get_input_value('_msg', rcube_utils::INPUT_GPC, true)) {
$storage = $this->rc->get_storage();
list($uid, $folder) = explode('-', $msgref, 2);
if ($message = $storage->get_message_headers($msgref)) {
@@ -408,8 +408,8 @@ class kolab_notes extends rcube_plugin
*/
public function notes_fetch()
{
- $search = rcube_utils::get_input_value('_q', RCUBE_INPUT_GPC, true);
- $list = rcube_utils::get_input_value('_list', RCUBE_INPUT_GPC);
+ $search = rcube_utils::get_input_value('_q', rcube_utils::INPUT_GPC, true);
+ $list = rcube_utils::get_input_value('_list', rcube_utils::INPUT_GPC);
$data = $this->notes_data($this->list_notes($list, $search), $tags);
@@ -492,8 +492,8 @@ class kolab_notes extends rcube_plugin
public function note_record()
{
$data = $this->get_note(array(
- 'uid' => rcube_utils::get_input_value('_id', RCUBE_INPUT_GPC),
- 'list' => rcube_utils::get_input_value('_list', RCUBE_INPUT_GPC),
+ 'uid' => rcube_utils::get_input_value('_id', rcube_utils::INPUT_GPC),
+ 'list' => rcube_utils::get_input_value('_list', rcube_utils::INPUT_GPC),
));
// encode for client use
@@ -586,8 +586,8 @@ class kolab_notes extends rcube_plugin
*/
public function note_action()
{
- $action = rcube_utils::get_input_value('_do', RCUBE_INPUT_POST);
- $note = rcube_utils::get_input_value('_data', RCUBE_INPUT_POST, true);
+ $action = rcube_utils::get_input_value('_do', rcube_utils::INPUT_POST);
+ $note = rcube_utils::get_input_value('_data', rcube_utils::INPUT_POST, true);
$success = false;
switch ($action) {
@@ -759,12 +759,12 @@ class kolab_notes extends rcube_plugin
*/
public function list_action()
{
- $action = rcube_utils::get_input_value('_do', RCUBE_INPUT_GPC);
- $list = rcube_utils::get_input_value('_list', RCUBE_INPUT_GPC, true);
+ $action = rcube_utils::get_input_value('_do', rcube_utils::INPUT_GPC);
+ $list = rcube_utils::get_input_value('_list', rcube_utils::INPUT_GPC, true);
$success = $update_cmd = false;
if (empty($action)) {
- $action = rcube_utils::get_input_value('action', RCUBE_INPUT_GPC);
+ $action = rcube_utils::get_input_value('action', rcube_utils::INPUT_GPC);
}
switch ($action) {
@@ -828,7 +828,7 @@ class kolab_notes extends rcube_plugin
case 'search':
$this->load_ui();
$results = array();
- foreach ((array)$this->search_lists(rcube_utils::get_input_value('q', RCUBE_INPUT_GPC), rcube_utils::get_input_value('source', RCUBE_INPUT_GPC)) as $id => $prop) {
+ foreach ((array)$this->search_lists(rcube_utils::get_input_value('q', rcube_utils::INPUT_GPC), rcube_utils::get_input_value('source', rcube_utils::INPUT_GPC)) as $id => $prop) {
$editname = $prop['editname'];
unset($prop['editname']); // force full name to be displayed
@@ -845,7 +845,7 @@ class kolab_notes extends rcube_plugin
$this->rc->output->show_message('autocompletemore', 'info');
}
- $this->rc->output->command('multi_thread_http_response', $results, rcube_utils::get_input_value('_reqid', RCUBE_INPUT_GPC));
+ $this->rc->output->command('multi_thread_http_response', $results, rcube_utils::get_input_value('_reqid', rcube_utils::INPUT_GPC));
return;
case 'subscribe':
diff --git a/plugins/kolab_notes/kolab_notes_ui.php b/plugins/kolab_notes/kolab_notes_ui.php
index 817a228..1726980 100644
--- a/plugins/kolab_notes/kolab_notes_ui.php
+++ b/plugins/kolab_notes/kolab_notes_ui.php
@@ -70,10 +70,10 @@ class kolab_notes_ui
'print_template' => $this->rc->url('print'),
);
- if ($list = rcube_utils::get_input_value('_list', RCUBE_INPUT_GPC)) {
+ if ($list = rcube_utils::get_input_value('_list', rcube_utils::INPUT_GPC)) {
$settings['selected_list'] = $list;
}
- if ($uid = rcube_utils::get_input_value('_id', RCUBE_INPUT_GPC)) {
+ if ($uid = rcube_utils::get_input_value('_id', rcube_utils::INPUT_GPC)) {
$settings['selected_uid'] = $uid;
}
@@ -409,7 +409,7 @@ class kolab_notes_ui
*/
public function folder_acl_form()
{
- $folder = rcube_utils::get_input_value('_folder', RCUBE_INPUT_GPC);
+ $folder = rcube_utils::get_input_value('_folder', rcube_utils::INPUT_GPC);
if (strlen($folder)) {
$storage = $this->rc->get_storage();
diff --git a/plugins/kolab_zpush/kolab_zpush.php b/plugins/kolab_zpush/kolab_zpush.php
index 6f38182..e9d1170 100644
--- a/plugins/kolab_zpush/kolab_zpush.php
+++ b/plugins/kolab_zpush/kolab_zpush.php
@@ -90,8 +90,8 @@ class kolab_zpush extends rcube_plugin
public function json_command()
{
$storage = $this->rc->get_storage();
- $cmd = get_input_value('cmd', RCUBE_INPUT_GPC);
- $imei = get_input_value('id', RCUBE_INPUT_GPC);
+ $cmd = rcube_utils::get_input_value('cmd', rcube_utils::INPUT_GPC);
+ $imei = rcube_utils::get_input_value('id', rcube_utils::INPUT_GPC);
switch ($cmd) {
case 'load':
@@ -117,12 +117,12 @@ class kolab_zpush extends rcube_plugin
break;
case 'save':
+ $syncmode = intval(rcube_utils::get_input_value('syncmode', rcube_utils::INPUT_POST));
+ $laxpic = intval(rcube_utils::get_input_value('laxpic', rcube_utils::INPUT_POST));
+ $devicealias = rcube_utils::get_input_value('devicealias', rcube_utils::INPUT_POST, true);
+ $subsciptions = rcube_utils::get_input_value('subscribed', rcube_utils::INPUT_POST);
$devices = $this->list_devices();
- $syncmode = intval(get_input_value('syncmode', RCUBE_INPUT_POST));
- $devicealias = get_input_value('devicealias', RCUBE_INPUT_POST, true);
- $laxpic = intval(get_input_value('laxpic', RCUBE_INPUT_POST));
- $subsciptions = get_input_value('subscribed', RCUBE_INPUT_POST);
- $err = false;
+ $err = false;
if ($device = $devices[$imei]) {
// update device config if changed
diff --git a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
index fe85d5c..0e2ecab 100644
--- a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
+++ b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
@@ -1286,7 +1286,7 @@ class tasklist_kolab_driver extends tasklist_driver
*/
public function folder_acl_form()
{
- $folder = rcube_utils::get_input_value('_folder', RCUBE_INPUT_GPC);
+ $folder = rcube_utils::get_input_value('_folder', rcube_utils::INPUT_GPC);
if (strlen($folder)) {
$storage = $this->rc->get_storage();
diff --git a/plugins/tasklist/tasklist.php b/plugins/tasklist/tasklist.php
index c5d50f2..5824527 100644
--- a/plugins/tasklist/tasklist.php
+++ b/plugins/tasklist/tasklist.php
@@ -197,9 +197,9 @@ class tasklist extends rcube_plugin
*/
public function task_action()
{
- $filter = intval(get_input_value('filter', RCUBE_INPUT_GPC));
- $action = get_input_value('action', RCUBE_INPUT_GPC);
- $rec = get_input_value('t', RCUBE_INPUT_POST, true);
+ $filter = intval(rcube_utils::get_input_value('filter', rcube_utils::INPUT_GPC));
+ $action = rcube_utils::get_input_value('action', rcube_utils::INPUT_GPC);
+ $rec = rcube_utils::get_input_value('t', rcube_utils::INPUT_POST, true);
$oldrec = $rec;
$success = $refresh = false;
@@ -272,7 +272,7 @@ class tasklist extends rcube_plugin
break;
case 'delete':
- $mode = intval(get_input_value('mode', RCUBE_INPUT_POST));
+ $mode = intval(rcube_utils::get_input_value('mode', rcube_utils::INPUT_POST));
$oldrec = $this->driver->get_task($rec);
if ($success = $this->driver->delete_task($rec, false)) {
// delete/modify all childs
@@ -315,7 +315,7 @@ class tasklist extends rcube_plugin
case 'collapse':
foreach (explode(',', $rec['id']) as $rec_id) {
- if (intval(get_input_value('collapsed', RCUBE_INPUT_GPC))) {
+ if (intval(rcube_utils::get_input_value('collapsed', rcube_utils::INPUT_GPC))) {
$this->collapsed_tasks[] = $rec_id;
}
else {
@@ -329,13 +329,13 @@ class tasklist extends rcube_plugin
return; // avoid further actions
case 'rsvp':
- $status = get_input_value('status', RCUBE_INPUT_GPC);
+ $status = rcube_utils::get_input_value('status', rcube_utils::INPUT_GPC);
$task = $this->driver->get_task($rec);
$task['attendees'] = $rec['attendees'];
$rec = $task;
if ($success = $this->driver->edit_task($rec)) {
- $noreply = intval(get_input_value('noreply', RCUBE_INPUT_GPC)) || $status == 'needs-action';
+ $noreply = intval(rcube_utils::get_input_value('noreply', rcube_utils::INPUT_GPC)) || $status == 'needs-action';
if (!$noreply) {
// let the reply clause further down send the iTip message
@@ -377,7 +377,7 @@ class tasklist extends rcube_plugin
$status = strtolower($sender['status']);
if (!empty($_POST['comment']))
- $task['comment'] = get_input_value('comment', RCUBE_INPUT_POST);
+ $task['comment'] = rcube_utils::get_input_value('comment', rcube_utils::INPUT_POST);
$itip = $this->load_itip();
$itip->set_sender_email($sender['email']);
@@ -797,8 +797,8 @@ class tasklist extends rcube_plugin
*/
public function tasklist_action()
{
- $action = get_input_value('action', RCUBE_INPUT_GPC);
- $list = get_input_value('l', RCUBE_INPUT_GPC, true);
+ $action = rcube_utils::get_input_value('action', rcube_utils::INPUT_GPC);
+ $list = rcube_utils::get_input_value('l', rcube_utils::INPUT_GPC, true);
$success = false;
if (isset($list['showalarms']))
@@ -845,7 +845,10 @@ class tasklist extends rcube_plugin
case 'search':
$this->load_ui();
$results = array();
- foreach ((array)$this->driver->search_lists(get_input_value('q', RCUBE_INPUT_GPC), get_input_value('source', RCUBE_INPUT_GPC)) as $id => $prop) {
+ $query = rcube_utils::get_input_value('q', rcube_utils::INPUT_GPC);
+ $source = rcube_utils::get_input_value('source', rcube_utils::INPUT_GPC);
+
+ foreach ((array)$this->driver->search_lists($query, $source) as $id => $prop) {
$editname = $prop['editname'];
unset($prop['editname']); // force full name to be displayed
$prop['active'] = false;
@@ -863,7 +866,7 @@ class tasklist extends rcube_plugin
$this->rc->output->show_message('autocompletemore', 'info');
}
- $this->rc->output->command('multi_thread_http_response', $results, get_input_value('_reqid', RCUBE_INPUT_GPC));
+ $this->rc->output->command('multi_thread_http_response', $results, rcube_utils::get_input_value('_reqid', rcube_utils::INPUT_GPC));
return;
}
@@ -881,7 +884,7 @@ class tasklist extends rcube_plugin
public function fetch_counts()
{
if (isset($_REQUEST['lists'])) {
- $lists = get_input_value('lists', RCUBE_INPUT_GPC);
+ $lists = rcube_utils::get_input_value('lists', rcube_utils::INPUT_GPC);
}
else {
foreach ($this->driver->get_lists() as $list) {
@@ -909,10 +912,10 @@ class tasklist extends rcube_plugin
*/
public function fetch_tasks()
{
- $f = intval(get_input_value('filter', RCUBE_INPUT_GPC));
- $search = get_input_value('q', RCUBE_INPUT_GPC);
+ $f = intval(rcube_utils::get_input_value('filter', rcube_utils::INPUT_GPC));
+ $search = rcube_utils::get_input_value('q', rcube_utils::INPUT_GPC);
+ $lists = rcube_utils::get_input_value('lists', rcube_utils::INPUT_GPC);
$filter = array('mask' => $f, 'search' => $search);
- $lists = get_input_value('lists', RCUBE_INPUT_GPC);;
/*
// convert magic date filters into a real date range
switch ($f) {
@@ -1214,10 +1217,10 @@ class tasklist extends rcube_plugin
$filter = array(
'since' => $attr['last'],
- 'search' => get_input_value('q', RCUBE_INPUT_GPC),
- 'mask' => intval(get_input_value('filter', RCUBE_INPUT_GPC)) & self::FILTER_MASK_COMPLETE,
+ 'search' => rcube_utils::get_input_value('q', rcube_utils::INPUT_GPC),
+ 'mask' => intval(rcube_utils::get_input_value('filter', rcube_utils::INPUT_GPC)) & self::FILTER_MASK_COMPLETE,
);
- $lists = get_input_value('lists', RCUBE_INPUT_GPC);;
+ $lists = rcube_utils::get_input_value('lists', rcube_utils::INPUT_GPC);;
$updates = $this->driver->list_tasks($filter, $lists);
if (!empty($updates)) {
@@ -1286,9 +1289,9 @@ class tasklist extends rcube_plugin
return $this->lib->attachment_loading_page();
}
- $task = get_input_value('_t', RCUBE_INPUT_GPC);
- $list = get_input_value('_list', RCUBE_INPUT_GPC);
- $id = get_input_value('_id', RCUBE_INPUT_GPC);
+ $task = rcube_utils::get_input_value('_t', rcube_utils::INPUT_GPC);
+ $list = rcube_utils::get_input_value('_list', rcube_utils::INPUT_GPC);
+ $id = rcube_utils::get_input_value('_id', rcube_utils::INPUT_GPC);
$task = array('id' => $task, 'list' => $list);
$attachment = $this->driver->get_attachment($id, $task);
@@ -1316,8 +1319,8 @@ class tasklist extends rcube_plugin
public function mail_message2task()
{
- $uid = get_input_value('_uid', RCUBE_INPUT_POST);
- $mbox = get_input_value('_mbox', RCUBE_INPUT_POST);
+ $uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST);
+ $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST);
$task = array();
// establish imap connection