From 021f8edfee76a1a3a58fe34a1367e876f8f89003 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 9 Feb 2014 16:31:22 -0600 Subject: updates per narfbg's comments --- system/libraries/Calendar.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'system') diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php index 977342249..3cb30dba2 100644 --- a/system/libraries/Calendar.php +++ b/system/libraries/Calendar.php @@ -56,7 +56,7 @@ class CI_Calendar { /** * Calendar layout template * - * @var string|array + * @var mixed */ public $template = ''; @@ -528,12 +528,12 @@ class CI_Calendar { { $this->replacements = $this->default_template(); - if (!$this->template) + if (empty($this->template)) { return $this; } - if(is_string($this->template)) + if (is_string($this->template)) { $today = array('cal_cell_start_today', 'cal_cell_content_today', 'cal_cell_no_content_today', 'cal_cell_end_today'); @@ -551,11 +551,12 @@ class CI_Calendar { return $this; } - - elseif(is_array($this->template)) + elseif (is_array($this->template)) { $this->replacements = array_merge($this->replacements, $this->template); } + + return $this; } } -- cgit v1.2.3-24-g4f1b