Author: nathangray
New Revision: 33820
URL: http://www.egroupware.org/viewvc/egroupware?rev=33820&view=rev
Log:
Apply current filters to range selections when merging
Modified:
trunk/calendar/inc/class.calendar_merge.inc.php
Modified: trunk/calendar/inc/class.calendar_merge.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/calendar/inc/class.calendar_merge.inc.php?rev=33820&r1=33819&r2=33820&view=diff
— trunk/calendar/inc/class.calendar_merge.inc.php (original)
+++ trunk/calendar/inc/class.calendar_merge.inc.php Wed Feb 16 18:19:19 2011
@@ -52,6 +52,11 @@
);
/**
-
- Base query for all event searches
-
*/
-
protected $query = array();
-
/**
- Constructor
*/
function __construct()
@@ -77,6 +82,7 @@
foreach(self::$relative as $day) {
$this->table_plugins[$day] = ‘day’; // Current day
}
- Constructor
-
$this->query = $GLOBALS['egw']->session->appsession('session_data','calendar');}
/**
@@ -91,14 +97,17 @@
$prefix = ‘’;// List events ?
-
if(is_array($id) && !$id['id'] && strpos($content,'$$calendar/') !== false || strpos($content, '$$table/day') !== false) -
{ -
$events = $this->bo->search($id + array(
-
if(is_array($id) && !$id['id']) -
{ -
$events = $this->bo->search($this->query + $id + array( 'offset' => 0, 'order' => 'cal_start', ));
-
array_unshift($events,false); unset($events[0]); // renumber the array to start with key 1, instead of 0 -
$prefix = 'calendar/%d';
-
if(strpos($content,'$$calendar/') !== false || strpos($content, '$$table/day') !== false) -
{ -
array_unshift($events,false); unset($events[0]); // renumber the array to start with key 1, instead of 0 -
$prefix = 'calendar/%d'; -
} } else {
@@ -194,7 +203,7 @@
if($days[date('Ymd',$_date)][$plugin]) return $days[date('Ymd',$_date)][$plugin][$n];
-
$events = $this->bo->search(array(
-
$events = $this->bo->search($this->query + array( 'start' => $date['end'] ? $date['start'] : mktime(0,0,0,date('m',$_date),date('d',$_date),date('Y',$_date)), 'end' => $date['end'] ? $date['end'] : mktime(23,59,59,date('m',$_date),date('d',$_date),date('Y',$_date)), 'offset' => 0,
@@ -251,7 +260,7 @@
$_date = $id[‘start’] ? $id[‘start’] : $date;
if($days[date(‘Ymd’,$_date)][$plugin]) return $days[date(‘Ymd’,$_date)][$plugin][$n];
-
$events = $this->bo->search(array(
-
$events = $this->bo->search($this->query + array( 'start' => $date, 'end' => mktime(23,59,59,date('m',$date),date('d',$date),date('Y',$date)), 'offset' => 0,
@@ -270,10 +279,6 @@
}
//_debug_array($days);
return $days[date(‘Ymd’,$_date)][$plugin][0];
-
}
-
/**
-
- Table plugin for a certain date
}
/**
- Table plugin for a certain date
The ultimate all-in-one performance toolkit: Intel® Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs