mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-01 19:09:30 +01:00
- Fix a problem with the daylight saving: The static increment could not cope
and another week (without events) is shown. - Fix the default value to be consistently 2 at both places where specified - Fix problem with calendar events "search()" function: offset needs to be 0. - remove numEntries, which does not make sense for the weekN view (will fill up the weeks only up to the event which is counted to max.) and seems to be a legacy from the list view code.
This commit is contained in:
parent
90a3a946f6
commit
c6886bee7d
@ -74,12 +74,6 @@ class module_calendar_month extends Module
|
|||||||
'type' => 'textfield',
|
'type' => 'textfield',
|
||||||
'label' => lang('Search string for the events'),
|
'label' => lang('Search string for the events'),
|
||||||
),
|
),
|
||||||
'numEntries' => array(
|
|
||||||
'type' => 'textfield',
|
|
||||||
'label' => lang('Max. Number of entries to show (leave empty for no restriction)'),
|
|
||||||
'default' => '',
|
|
||||||
'params' => array('size' => 1),
|
|
||||||
),
|
|
||||||
'users' => array(
|
'users' => array(
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'options' => array(),
|
'options' => array(),
|
||||||
@ -232,7 +226,7 @@ class module_calendar_month extends Module
|
|||||||
$this->ui->allowEdit = false;
|
$this->ui->allowEdit = false;
|
||||||
$this->ui->use_time_grid = isset($arguments['grid']) ? $arguments['grid'] : false;
|
$this->ui->use_time_grid = isset($arguments['grid']) ? $arguments['grid'] : false;
|
||||||
|
|
||||||
$weeks = $arguments['numWeeks'] ? (int) $arguments['numWeeks'] : 4;
|
$weeks = $arguments['numWeeks'] ? (int) $arguments['numWeeks'] : 2;
|
||||||
|
|
||||||
if (($arguments['acceptDateParam']) && (get_var('date',array('POST','GET'))))
|
if (($arguments['acceptDateParam']) && (get_var('date',array('POST','GET'))))
|
||||||
{
|
{
|
||||||
@ -248,8 +242,7 @@ class module_calendar_month extends Module
|
|||||||
adodb_date('Y',$start),
|
adodb_date('Y',$start),
|
||||||
adodb_date('m',$start),
|
adodb_date('m',$start),
|
||||||
adodb_date('d',$start));
|
adodb_date('d',$start));
|
||||||
$last = (int) ($first +
|
$last = strtotime("+$weeks weeks",$first) - 1;
|
||||||
(60 * 60 * 24 * 7 * $weeks));
|
|
||||||
|
|
||||||
if ($arguments['showTitle'])
|
if ($arguments['showTitle'])
|
||||||
{
|
{
|
||||||
@ -261,7 +254,7 @@ class module_calendar_month extends Module
|
|||||||
// set the search parameters
|
// set the search parameters
|
||||||
$search_params = Array
|
$search_params = Array
|
||||||
(
|
(
|
||||||
'offset' => 0, // should be false if you want no restrictions on the number of results
|
'offset' => false,
|
||||||
'order' => 'cal_start ASC',
|
'order' => 'cal_start ASC',
|
||||||
'start' => $first,
|
'start' => $first,
|
||||||
'end' => $last,
|
'end' => $last,
|
||||||
@ -280,14 +273,6 @@ class module_calendar_month extends Module
|
|||||||
{
|
{
|
||||||
$search_params['users'] = $arguments['users'];
|
$search_params['users'] = $arguments['users'];
|
||||||
}
|
}
|
||||||
if ($arguments['numEntries'])
|
|
||||||
{
|
|
||||||
$search_params['num_rows'] = (int) $arguments['numEntries'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$search_params['offset'] = false;
|
|
||||||
}
|
|
||||||
$rows = $this->bo->search($search_params);
|
$rows = $this->bo->search($search_params);
|
||||||
if ($arguments['showWeeks'])
|
if ($arguments['showWeeks'])
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user