/** * Opens a calendar stream, if it has not already been * opened. This is implicitly called by log(), if necessary. * @access public */ function open() { if (!$this->_opened) { $this->_stream = mcal_open($this->_calendar, $this->_username, $this->_password, $this->_options); $this->_opened = true; } }
function open($calendar = '', $user = '', $passwd = '', $options = '') { if ($user == '') { $user = $GLOBALS['phpgw_info']['user']['account_lid']; } elseif (is_int($user)) { $this->user = $GLOBALS['phpgw']->accounts->id2name($user); } elseif (is_string($user)) { $this->user = $user; } if ($options != '') { $this->stream = mcal_open('{' . $GLOBALS['phpgw_info']['server']['icap_server'] . '/' . $GLOBALS['phpgw_info']['server']['icap_type'] . '}' . $calendar, $this->user, $passwd, $options); } else { $this->stream = mcal_open('{' . $GLOBALS['phpgw_info']['server']['icap_server'] . '/' . $GLOBALS['phpgw_info']['server']['icap_type'] . '}' . $calendar, $this->user, $passwd); } }