forked from extern/egroupware
Fix iCal export
This commit is contained in:
parent
955be2c365
commit
25a8b7dbc4
@ -35,13 +35,14 @@ class calendar_export_ical extends calendar_export_csv {
|
||||
$limit_exception = bo_merge::is_export_limit_excepted();
|
||||
if (!$limit_exception) $export_limit = bo_merge::getExportLimit('calendar');
|
||||
|
||||
if($options['selection']['select'] == 'criteria') {
|
||||
if($options['selection'] == 'criteria')
|
||||
{
|
||||
$query = array(
|
||||
'start' => $options['selection']['start'],
|
||||
'end' => strtotime('+1 day',$options['selection']['end'])-1,
|
||||
'categories' => $options['categories'] ? $options['categories'] : $options['selection']['categories'],
|
||||
'start' => $options['criteria']['start'],
|
||||
'end' => strtotime('+1 day',$options['criteria']['end'])-1,
|
||||
'categories' => $options['categories'],
|
||||
'daywise' => false,
|
||||
'users' => $options['selection']['owner'],
|
||||
'users' => $options['criteria']['owner'],
|
||||
'cfs' => $cfs // Otherwise we shouldn't get any custom fields
|
||||
);
|
||||
if(bo_merge::hasExportLimit($export_limit) && !$limit_exception) {
|
||||
@ -49,9 +50,12 @@ class calendar_export_ical extends calendar_export_csv {
|
||||
$query['num_rows'] = (int)$export_limit; // ! int of 'no' is 0
|
||||
}
|
||||
$events =& $this->bo->search($query);
|
||||
} elseif ($options['selection']['select'] == 'search_results') {
|
||||
}
|
||||
elseif ($options['selection'] == 'search_results')
|
||||
{
|
||||
$states = $GLOBALS['egw']->session->appsession('session_data','calendar');
|
||||
if($states['view'] == 'listview') {
|
||||
if($states['view'] == 'listview')
|
||||
{
|
||||
$query = $GLOBALS['egw']->session->appsession('calendar_list','calendar');
|
||||
$query['num_rows'] = -1; // all
|
||||
$query['start'] = 0;
|
||||
@ -62,16 +66,20 @@ class calendar_export_ical extends calendar_export_csv {
|
||||
}
|
||||
$ui = new calendar_uilist();
|
||||
$ui->get_rows($query, $events, $unused);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$query = $GLOBALS['egw']->session->appsession('session_data','calendar');
|
||||
$query['users'] = explode(',', $query['owner']);
|
||||
$query['num_rows'] = -1;
|
||||
if(bo_merge::hasExportLimit($export_limit) && !$limit_exception) {
|
||||
if(bo_merge::hasExportLimit($export_limit) && !$limit_exception)
|
||||
{
|
||||
$query['num_rows'] = (int)$export_limit; // ! int of 'no' is 0
|
||||
}
|
||||
|
||||
$events = array();
|
||||
switch($states['view']) {
|
||||
switch($states['view'])
|
||||
{
|
||||
case 'month':
|
||||
$query += calendar_export_csv::get_query_month($states);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user