mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
fixed searching of events
This commit is contained in:
parent
4259d8d622
commit
6a86c442a3
@ -220,6 +220,27 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
$query = array(
|
||||
'cal_start='.$this->date2ts($event['start'],true), // true = Server-time
|
||||
'cal_end='.$this->date2ts($event['end'],true),
|
||||
);
|
||||
|
||||
#foreach(array('title','location','priority','public','non_blocking') as $name) {
|
||||
foreach(array('title','location','public','non_blocking') as $name) {
|
||||
if (isset($event[$name])) $query['cal_'.$name] = $event[$name];
|
||||
}
|
||||
|
||||
if($foundEvents = parent::search(array(
|
||||
'user' => $this->user,
|
||||
'query' => $query,
|
||||
))) {
|
||||
if(is_array($foundEvents)) {
|
||||
$event = array_shift($foundEvents);
|
||||
return $event['id'];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
$search['start'] = $event['start'];
|
||||
$search['end'] = $event['end'];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user