Hello, I cannot create and update events. My code looks like this:
function wf_event_save ($id, $up, $start, $end, $title, $description, $type=0, $extra='', $owner=$GLOBALS['author'], $busy=FALSE) {
### create
if($id==0) {
$event = mgd_create_event(
$up
,$start
,$end
,trim($title)
,trim($description)
,$type
,$extra
,$GLOBALS['author']
,$busy
);
if (!$event) return FALSE;
else {
$event = mgd_get_event_by_name($topic_id, $name);
$return = $event->id;
}
} ### update
else {
$event = mgd_get_event($id); $event->id = $id;
$event->start = $start;
$event->end = $end;
$event->title = trim($title);
$event->description = trim($description);
$event->type = 0;
$event->extra = '';
$event->author = $GLOBALS['author'];
$event->busy = FALSE; if (!$id = $event->update()) return FALSE;
else return $event->id;} }
My suggestions are it may be a problems of rights: I am logged in as an user of a special sitegroup but I cannot set the sitegroup of an event when creating it, although a sitegroup field exists in the database. Using $event->setsitegroup($sitegroup_id) seems not to help either, cos I had to create the event before setting the sitegroup of it.
Does anyone has any hints? Many thanks!
Axel
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
