From c276b0b88b39463d35e1dc68a7d1791a0b1e1f0a Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Thu, 25 Jul 2013 10:24:05 +0200 Subject: [PATCH] Fix calendar settings form (wrong selection for calendar_timeslots) --- plugins/calendar/calendar.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php index b5e881b8..5c866da7 100644 --- a/plugins/calendar/calendar.php +++ b/plugins/calendar/calendar.php @@ -346,7 +346,7 @@ class calendar extends rcube_plugin $select->add($choices); $p['blocks']['view']['options']['timeslots'] = array( 'title' => html::label($field_id, Q($this->gettext('timeslots'))), - 'content' => $select->show($this->rc->config->get('calendar_timeslots', $this->defaults['calendar_timeslots'])), + 'content' => $select->show(strval($this->rc->config->get('calendar_timeslots', $this->defaults['calendar_timeslots']))), ); } @@ -561,8 +561,8 @@ class calendar extends rcube_plugin $p['prefs'] = array( 'calendar_default_view' => get_input_value('_default_view', RCUBE_INPUT_POST), - 'calendar_timeslots' => get_input_value('_timeslots', RCUBE_INPUT_POST), - 'calendar_first_day' => get_input_value('_first_day', 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)),