fixed bug [ 1103731 ] calendar dont work without infolog installed

fixed bug [ 1115160 ] Calender Updated Time Error
This commit is contained in:
Ralf Becker 2005-02-09 18:17:44 +00:00
parent 008cb40024
commit 388b950a2a

View File

@ -527,7 +527,6 @@
function read_entry($id,$ignore_acl=False)
{
$bolink = createObject('infolog.bolink');
if (is_array($id) && count($id) == 1)
{
list(,$id) = each($id);
@ -535,6 +534,10 @@
if($ignore_acl || $this->check_perms(PHPGW_ACL_READ,$id))
{
$event = $this->so->read_entry($id);
if (isset($GLOBALS['phpgw_info']['apps']['infolog'])) // check if infolog is installed
{
$bolink = createObject('infolog.bolink');
$linkIDs = $bolink->get_links('calendar', $id);
if(is_array($linkIDs))
{
@ -548,6 +551,7 @@
}
}
}
}
if(!isset($event['participants'][$this->owner]) && $this->user_is_a_member($event,$this->owner))
{
$this->so->add_attribute('participants','U',(int)$this->owner);
@ -1117,7 +1121,8 @@
}
$date = sprintf("%04d%02d%02d",$event['start']['year'],$event['start']['month'],$event['start']['mday']);
if(isset($l_cal['project']))
// check if infolog is availible
if(isset($GLOBALS['phpgw_info']['apps']['infolog']) && isset($l_cal['project']))
{
$bolink = createObject('infolog.bolink');
$bolink->unlink(0,'calendar',$event['id']);
@ -3100,7 +3105,7 @@
$var['updated'] = Array(
'field' => lang('Updated'),
'data' => $GLOBALS['phpgw']->common->show_date($this->maketime($event['modtime']) - $GLOBALS['phpgw']->datetime->tz_offset)
'data' => $GLOBALS['phpgw']->common->show_date($this->maketime($event['modtime']))
);
$var['access'] = Array(