From 8f26ec2b1b7047823f3de7c6d1a2601bf7870265 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 14 Jul 2006 23:25:52 +0000 Subject: [PATCH] automatic setting the freebusy url for accounts --- addressbook/inc/class.bocontacts.inc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/addressbook/inc/class.bocontacts.inc.php b/addressbook/inc/class.bocontacts.inc.php index c8eee1fcbc..4584303c08 100755 --- a/addressbook/inc/class.bocontacts.inc.php +++ b/addressbook/inc/class.bocontacts.inc.php @@ -319,7 +319,14 @@ class bocontacts extends socontacts } } $data['photo'] = $this->photo_src($data['id'],$data['jpegphoto']); - + + // set freebusy_uri for accounts + if (!$data['freebusy_uri'] && !$data['owner'] && $data['account_id']) + { + static $fb_url; + if (!$fb_url && @is_dir(EGW_SERVER_ROOT.'/calendar/inc')) $fb_url = ExecMethod('calendar.bocal.freebusy_url',''); + if ($fb_url) $data['freebusy_uri'] = $fb_url.urlencode($GLOBALS['egw']->accounts->id2name($data['account_id'])); + } return $data; }