fix for bug [ 1004555 ] Database error adding new calendar item:

- happend only if participants have been disabled via custom-fields
- was caused by the code entering participants from matrixview
This commit is contained in:
Ralf Becker 2004-08-07 14:19:53 +00:00
parent 298623b7cb
commit e29ca14960
2 changed files with 3 additions and 4 deletions

View File

@ -2621,7 +2621,7 @@
{
$details[$key] = $val['data'];
}
$details['participants'] = implode("\n",$details['participants']);
$details['participants'] = $details['participants'] ? implode("\n",$details['participants']) : '';
$details['link'] = $GLOBALS['phpgw_info']['server']['webserver_url'].'/index.php?menuaction=calendar.uicalendar.view&cal_id='.$event['id'];
// if url is only a path, try guessing the rest ;-)

View File

@ -1280,10 +1280,9 @@
$this->bo->set_class(True);
}
// Add participants from matrixview
$participants = explode(";", $GLOBALS['phpgw']->session->appsession("participants") );
for($_f_part=0; $_f_part<count($participants); $_f_part++)
foreach(explode(';',$GLOBALS['phpgw']->session->appsession("participants")) as $part)
{
$this->bo->add_attribute('participants','U',$participants[$_f_part]);
if ($part) $this->bo->add_attribute('participants','U',$part);
}
// Add misc
$this->bo->add_attribute('participants','A',$this->bo->owner);