"optional argument to specify a startdate"

This commit is contained in:
Ralf Becker 2010-04-27 14:25:19 +00:00
parent a2e2c5f797
commit d5a2b01981

View File

@ -58,6 +58,12 @@ class module_calendar_planner extends Module
),
'default' => 'default',
),
'date' => array(
'type' => 'textfield',
'label' => 'Startdate as YYYYmmdd (empty for current date)',
'default' => '',
'params' => array('size' => 10),
),
);
$this->title = lang('Calendar - Planner');
$this->description = lang('This module displays a planner calendar.');
@ -91,6 +97,10 @@ class module_calendar_planner extends Module
translation::add_app('calendar');
$arguments['view'] = 'planner';
if (empty($arguments['date']))
{
$arguments['date'] = date('Ymd');
}
if ($arguments['sortby'] == 'yearly')
{
$arguments['sortby'] = 'month';