diff --git a/kronolith/lib/FreeBusy.php b/kronolith/lib/FreeBusy.php index 6be731e..8fd9661 100644 --- a/kronolith/lib/FreeBusy.php +++ b/kronolith/lib/FreeBusy.php @@ -170,9 +170,19 @@ class Kronolith_FreeBusy $email = $tmp->bare_address; + /* Get the Identity for the current user */ + $identity = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Identity')->create(); + + $url = self::getUrl($email); + + /* check if owners free/busy URL should be returned (if none is set in address book) */ + if ( strcmp( $email, strval($identity->getDefaultFromAddress()) ) === 0 && + ( !$url || strlen(trim($url)) === 0 ) ) + $url = Horde::url('fb.php', true, array('append_session' => -1)) + ->add('u', $GLOBALS['registry']->getAuth()); + /* Check if we can retrieve a VFB from the Free/Busy URL, if one is * set. */ - $url = self::getUrl($email); if ($url) { $url = trim($url); $http = $GLOBALS['injector']