forked from extern/egroupware
Fix export of calendar views weekN, year
This commit is contained in:
parent
24cc74442f
commit
df01374c23
@ -82,7 +82,14 @@ class calendar_export_csv implements importexport_iface_export_plugin {
|
|||||||
$query += $this->get_query_day($states);
|
$query += $this->get_query_day($states);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
// Let UI set the date ranges
|
||||||
$ui = new calendar_uiviews($query);
|
$ui = new calendar_uiviews($query);
|
||||||
|
if(method_exists($ui, $states['view']))
|
||||||
|
{
|
||||||
|
ob_start();
|
||||||
|
$ui->$states['view']();
|
||||||
|
ob_end_flush();
|
||||||
|
}
|
||||||
$query += array(
|
$query += array(
|
||||||
'start' => is_array($ui->first) ? $this->bo->date2ts($ui->first) : $ui->first,
|
'start' => is_array($ui->first) ? $this->bo->date2ts($ui->first) : $ui->first,
|
||||||
'end' => is_array($ui->last) ? $this->bo->date2ts($ui->last) : $ui->last
|
'end' => is_array($ui->last) ? $this->bo->date2ts($ui->last) : $ui->last
|
||||||
@ -204,7 +211,7 @@ class calendar_export_csv implements importexport_iface_export_plugin {
|
|||||||
// Use UI to get dates
|
// Use UI to get dates
|
||||||
$ui = new calendar_uilist();
|
$ui = new calendar_uilist();
|
||||||
$list['csv_export'] = true; // so get_rows method _can_ produce different content or not store state in the session
|
$list['csv_export'] = true; // so get_rows method _can_ produce different content or not store state in the session
|
||||||
$ui->get_rows($list);
|
$ui->get_rows($list,$rows);
|
||||||
if($ui->first) $start = $ui->first;
|
if($ui->first) $start = $ui->first;
|
||||||
if($ui->last) $end = $ui->last;
|
if($ui->last) $end = $ui->last;
|
||||||
|
|
||||||
|
@ -82,7 +82,14 @@ class calendar_export_ical extends calendar_export_csv {
|
|||||||
$query += calendar_export_csv::get_query_day($states);
|
$query += calendar_export_csv::get_query_day($states);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
// Let UI set the date ranges
|
||||||
$ui = new calendar_uiviews($query);
|
$ui = new calendar_uiviews($query);
|
||||||
|
if(method_exists($ui, $states['view']))
|
||||||
|
{
|
||||||
|
ob_start();
|
||||||
|
$ui->$states['view']();
|
||||||
|
ob_end_clean();
|
||||||
|
}
|
||||||
$query += array(
|
$query += array(
|
||||||
'start' => is_array($ui->first) ? $this->bo->date2ts($ui->first) : $ui->first,
|
'start' => is_array($ui->first) ? $this->bo->date2ts($ui->first) : $ui->first,
|
||||||
'end' => is_array($ui->last) ? $this->bo->date2ts($ui->last) : $ui->last
|
'end' => is_array($ui->last) ? $this->bo->date2ts($ui->last) : $ui->last
|
||||||
|
Loading…
Reference in New Issue
Block a user