make _getOccurencesInTimeframe and _dateFor static

This commit is contained in:
Sebijk 2023-01-22 13:42:55 +01:00
parent e7f7e499a7
commit 8a675941b8

View file

@ -150,7 +150,7 @@ class BMCalendar
*
* @return array Row of occurenced
*/
public function _getOccurencesInTimeframe($row, $start, $end)
public static function _getOccurencesInTimeframe($row, $start, $end)
{
$result = [];
@ -354,7 +354,7 @@ class BMCalendar
$start,
$this->_userID);
while ($row = $res->FetchArray(MYSQLI_ASSOC)) {
$dates = $this->_getOccurencesInTimeframe($row, $start, $end);
$dates = BMCalendar::_getOccurencesInTimeframe($row, $start, $end);
if (count($dates) > 0) {
$result = array_merge($result, $dates);
}
@ -491,7 +491,7 @@ class BMCalendar
$end,
$start);
while ($row = $res->FetchArray(MYSQLI_ASSOC)) {
$dates = self::_getOccurencesInTimeframe($row, $start, $end);
$dates = BMCalendar::_getOccurencesInTimeframe($row, $start, $end);
if (count($dates) > 0) {
$remindDates = array_merge($remindDates, $dates);
}