summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin/index.php1
-rw-r--r--modules/index.php2
-rw-r--r--modules/mod_calendar.php15
-rw-r--r--modules/mod_minical.php6
4 files changed, 11 insertions, 13 deletions
diff --git a/admin/index.php b/admin/index.php
index 80f6d40..683644b 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -1,4 +1,3 @@
<?php
// This is not a package.
header ("location: ../index.php");
-?> \ No newline at end of file
diff --git a/modules/index.php b/modules/index.php
index 3e305fe..1e6de35 100644
--- a/modules/index.php
+++ b/modules/index.php
@@ -2,5 +2,3 @@
// This is not a package.
header ("location: ../index.php");
-
-?> \ No newline at end of file
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 ) );
diff --git a/modules/mod_minical.php b/modules/mod_minical.php
index c3d57b0..d9d0e43 100644
--- a/modules/mod_minical.php
+++ b/modules/mod_minical.php
@@ -11,6 +11,6 @@
global $gBitSmarty;
// Make sure we know how to do the data_calendar
-require_once(CALENDAR_PKG_PATH.'liberty_plugins/data.calendar.php');
-$_template->tpl_vars['mini_cal'] = new Smarty_variable(data_calendar( '', empty($moduleParams['module_params']) ) );
-?>
+require_once CALENDAR_PKG_PATH . 'liberty_plugins/data.calendar.php';
+
+$gBitSmarty->assign( 'mini_cal', data_calendar( '', empty($moduleParams['module_params']) ) );