forked from extern/egroupware
fix PHP Fatal because for removed datetime from calendar_ui
This commit is contained in:
parent
2da61eb731
commit
67f113be49
@ -254,20 +254,19 @@ class module_calendar_list extends Module
|
||||
|
||||
if (($arguments['acceptDateParam']) && (get_var('date',array('POST','GET'))))
|
||||
{
|
||||
$first = $start = (int) (strtotime(get_var('date',array('POST','GET'))) +
|
||||
$first = (int) (strtotime(get_var('date',array('POST','GET'))) +
|
||||
(60 * 60 * 24 * 7 * $dateOffset));
|
||||
}
|
||||
else
|
||||
{
|
||||
$first = $start = (int) ($this->bo->now_su +
|
||||
$first = (int) ($this->bo->now_su +
|
||||
(60 * 60 * 24 * 7 * $dateOffset));
|
||||
}
|
||||
if ($arguments['useWeekStart'])
|
||||
{
|
||||
$first = $this->ui->datetime->get_weekday_start(
|
||||
adodb_date('Y',$start),
|
||||
adodb_date('m',$start),
|
||||
adodb_date('d',$start));
|
||||
$start = Api\DateTime($first);
|
||||
$start->setWeekStart();
|
||||
$first = $start->format('ts');
|
||||
}
|
||||
|
||||
$last = (int) ($first +
|
||||
|
@ -239,10 +239,9 @@ class module_calendar_month extends Module
|
||||
$start = (int) ($this->bo->now_su +
|
||||
(60 * 60 * 24 * 7 * $dateOffset));
|
||||
}
|
||||
$first = $this->ui->datetime->get_weekday_start(
|
||||
adodb_date('Y',$start),
|
||||
adodb_date('m',$start),
|
||||
adodb_date('d',$start));
|
||||
$start = new Api\DateTime($start);
|
||||
$start->setWeekstart();
|
||||
$first = $start->format('ts');
|
||||
$last = strtotime("+$weeks weeks",$first) - 1;
|
||||
|
||||
if ($arguments['showTitle'])
|
||||
|
@ -198,7 +198,7 @@ class module_calendar_planner extends Module
|
||||
}
|
||||
$this->arguments['resources']['options'] = array_unique($this->arguments['resources']['options']);
|
||||
$this->arguments['resources']['multiple'] = count($this->arguments['resources']['options']) ? 4 : 0;
|
||||
|
||||
|
||||
|
||||
return parent::get_user_interface();
|
||||
}
|
||||
@ -281,7 +281,9 @@ class module_calendar_planner extends Module
|
||||
}
|
||||
elseif ($ui->planner_view == 'week' || $ui->planner_view == 'weekN') // weeekview
|
||||
{
|
||||
$ui->first = $ui->datetime->get_weekday_start($ui->year,$ui->month,$ui->day);
|
||||
$start = new Api\DateTime($ui->date);
|
||||
$start->setWeekstart();
|
||||
$ui->first = $start->format('ts');
|
||||
$ui->last = $ui->bo->date2array($this->first);
|
||||
$ui->last['day'] += ($ui->planner_view == 'week' ? 7 : 7 * $ui->cal_prefs['multiple_weeks'])-1;
|
||||
$ui->last['hour'] = 23; $ui->last['minute'] = $ui->last['sec'] = 59;
|
||||
|
Loading…
Reference in New Issue
Block a user