- Change default weekN to 2 weeks (& fix error)

- Remove no longer useful default view
This commit is contained in:
Nathan Gray 2015-12-15 20:06:03 +00:00
parent f0bfbbd687
commit 2e5b034ca0

View File

@ -168,7 +168,7 @@ class calendar_hooks
for ($i = 2; $i <= 4; ++$i) for ($i = 2; $i <= 4; ++$i)
{ {
$muliple_weeks[$i.' weeks'] = lang('%1 weeks',$i); $muliple_weeks[$i] = lang('%1 weeks',$i);
} }
$intervals = array( $intervals = array(
@ -241,7 +241,7 @@ class calendar_hooks
'help' => 'How many weeks should the multiple week view show?', 'help' => 'How many weeks should the multiple week view show?',
'xmlrpc' => True, 'xmlrpc' => True,
'admin' => False, 'admin' => False,
'forced'=> 3, 'default'=> 2,
), ),
'weekdaystarts' => array( 'weekdaystarts' => array(
'type' => 'select', 'type' => 'select',
@ -664,32 +664,6 @@ class calendar_hooks
), ),
); );
if ($hook_data['type'] === 'default')
{
$settings = array_slice($settings, 0, 1, true) + array(
'defaultcalendar' => array(
'type' => 'select',
'label' => 'Default calendar view',
'name' => 'defaultcalendar',
'help' => 'Only used for first viewing of calendar, afterwards last selected view is used.',
'values' => array(
'day' => lang('Dayview'),
'day4' => lang('four days view'),
'week' => lang('Weekview'),
'weekN' => lang('Multiple week view'),
'month' => lang('Monthview'),
'year' => lang('Yearview'),
'planner' => lang('Planner'),
'listview' => lang('listview'),
),
'xmlrpc' => True,
'admin' => False,
'default' => 'week',
),
) + array_slice($settings, 1, count($settings)-1, true);
}
return $settings; return $settings;
} }