From f7a6e46de1ca49c487c7aae393f7b892fe622227 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 1 Aug 2004 14:09:46 +0000 Subject: [PATCH] fixed bug [ 996591 ] Error when creating an entry in the calendar this happended only when email was not installed --- calendar/inc/class.bocalendar.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/calendar/inc/class.bocalendar.inc.php b/calendar/inc/class.bocalendar.inc.php index 733479ab37..a463ee86f1 100755 --- a/calendar/inc/class.bocalendar.inc.php +++ b/calendar/inc/class.bocalendar.inc.php @@ -2546,7 +2546,11 @@ { $user = $this->owner; } - $GLOBALS['phpgw_info']['user']['preferences'] = $GLOBALS['phpgw']->preferences->create_email_preferences($user); + if ($GLOBALS['phpgw']->preferences->account_id != $user) + { + $GLOBALS['phpgw']->preferences->preferences($user); + $GLOBALS['phpgw_info']['user']['preferences'] = $GLOBALS['phpgw']->preferences->read_repository(); + } $event = $msg_type == MSG_ADDED || $msg_type == MSG_MODIFIED ? $new_event : $old_event; if($old_event != False)