diff options
-rw-r--r-- | RecurringType.php | 8 | ||||
-rwxr-xr-x | SchedulerHelper.php | 6 |
2 files changed, 6 insertions, 8 deletions
diff --git a/RecurringType.php b/RecurringType.php index b72810a..96b062b 100644 --- a/RecurringType.php +++ b/RecurringType.php @@ -339,7 +339,10 @@ class RecurringType { */ public function getRecurringDates($intervalStartDateStamp, $intervalEndDateStamp, $countDates = NULL) { - if(!($this->getRecurringTypeStepValue() && $this->getRecurringTypeValue())) + $recurringTypeStep = $this->getRecurringTypeStepValue(); + $recType = $this->getRecurringTypeValue(); + + if(!($recType && $recType)) return false; //Correct interval by recurring interval. @@ -362,8 +365,7 @@ class RecurringType { $recurringDays = $this->_getRecurringDays($currentRecurringStartDateStamp); $recurringDates = array_merge($recurringDates, $recurringDays); - $recurringTypeStep = $this->getRecurringTypeStepValue(); - switch($this->getRecurringTypeValue()) { + switch($recType) { case self::REC_TYPE_DAY: $currentRecurringStartDateStamp = SchedulerHelperDate::addDays($currentRecurringStartDateStamp, $recurringTypeStep); break; diff --git a/SchedulerHelper.php b/SchedulerHelper.php index f438cfe..ef1dcec 100755 --- a/SchedulerHelper.php +++ b/SchedulerHelper.php @@ -396,13 +396,9 @@ class Helper extends DHelper implements IHelper $fullEventData = $eventData["full_event_data"]; $recurringStartDateStamp = $this->getDateTimestamp($fullEventData[$startField]); $recurringEndDateStamp = $this->getDateTimestamp($fullEventData[$endField]); - - if( - ($recurringStartDateStamp <= $intervalEndDateStamp) && ($recurringEndDateStamp >= $intervalStartDateStamp) - ) { + if($recurringStartDateStamp <= $intervalEndDateStamp && $recurringEndDateStamp >= $intervalStartDateStamp) { array_push($resultData, $eventData["filtered_event_data"]); } - } return $resultData; |