From 2e5b034ca09777da9d9887b9810a658601d09a4f Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 15 Dec 2015 20:06:03 +0000 Subject: [PATCH] - Change default weekN to 2 weeks (& fix error) - Remove no longer useful default view --- calendar/inc/class.calendar_hooks.inc.php | 30 ++--------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/calendar/inc/class.calendar_hooks.inc.php b/calendar/inc/class.calendar_hooks.inc.php index 0407feae23..f83eb154ae 100644 --- a/calendar/inc/class.calendar_hooks.inc.php +++ b/calendar/inc/class.calendar_hooks.inc.php @@ -168,7 +168,7 @@ class calendar_hooks for ($i = 2; $i <= 4; ++$i) { - $muliple_weeks[$i.' weeks'] = lang('%1 weeks',$i); + $muliple_weeks[$i] = lang('%1 weeks',$i); } $intervals = array( @@ -241,7 +241,7 @@ class calendar_hooks 'help' => 'How many weeks should the multiple week view show?', 'xmlrpc' => True, 'admin' => False, - 'forced'=> 3, + 'default'=> 2, ), 'weekdaystarts' => array( '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; }