diff options
Diffstat (limited to 'modules/mod_calendar.php')
| -rw-r--r-- | modules/mod_calendar.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/mod_calendar.php b/modules/mod_calendar.php index 92c390b..de80a5c 100644 --- a/modules/mod_calendar.php +++ b/modules/mod_calendar.php @@ -8,7 +8,9 @@ /** * Required setup */ -include_once( CALENDAR_PKG_PATH.'Calendar.php' ); +use Bitweaver\Calendar\Calendar; +global $gBitSmarty; + $cal = new Calendar(); // set up the todate @@ -26,13 +28,12 @@ if( !empty( $_REQUEST['todate'] ) ) { $_REQUEST["todate"] = $_SESSION['calendar']['focus_date']; } -$calHash = array( +$calHash = [ 'focus_date' => $_SESSION['calendar']['focus_date'], - 'view_mode' => 'month', -); + 'view_mode' => 'month', +]; $cal->setupCalendar(FALSE); -$_template->tpl_vars['modCalNavigation'] = new Smarty_variable( $cal->buildCalendarNavigation( $calHash ) ); -$_template->tpl_vars['modCalMonth'] = new Smarty_variable( $calMonth = $cal->buildMonth( $calHash ) ); -?> +$gBitSmarty->assign( 'modCalNavigation', $cal->buildCalendarNavigation( $calHash ) ); +$gBitSmarty->assign( 'modCalMonth', $calMonth = $cal->buildMonth( $calHash ) ); |
