Fix for a small problem of not returning the event if overlapped and not returning to the edit screen with the same data.

This commit is contained in:
skeeter 2001-11-08 00:18:42 +00:00
parent 7403548182
commit 063a410559
2 changed files with 28 additions and 5 deletions

View File

@ -507,6 +507,10 @@
$l_recur_enddate = (@isset($params['recur_enddate']) && $params['recur_enddate']?$params['recur_enddate']:$GLOBALS['HTTP_POST_VARS']['recur_enddate']);
$send_to_ui = True;
if($this->debug)
{
$send_to_ui = True;
}
if($p_cal || $p_participants || $p_start || $p_end || $p_recur_enddata)
{
$send_to_ui = False;
@ -662,6 +666,10 @@
}
$event = $this->get_cached_event();
if(!is_int($minparts))
{
$minparts = $this->owner;
}
if(!@isset($event['participants'][$l_cal['owner']]))
{
$this->so->add_attribute('owner',$minparts);
@ -677,6 +685,10 @@
$event['description'] = $GLOBALS['phpgw']->db->db_addslashes($event['description']);
$this->store_to_appsession($event);
$datetime_check = $this->validate_update($event);
if($this->debug)
{
echo '<!-- bo->validate_update() returned : '.$datetime_check.' -->'."\n";
}
if($datetime_check)
{
ExecMethod('calendar.uicalendar.edit',
@ -1948,7 +1960,7 @@
$new_event_datetime = $this->maketime($new_event['start']) - $this->datetime->tz_offset;
}
while(list($userid,$statusid) = each($participants))
while($participants && list($userid,$statusid) = each($participants))
{
if((intval($userid) != $GLOBALS['phpgw_info']['user']['account_id']) &&
(

View File

@ -696,6 +696,12 @@
{
$this->no_edit();
}
if($this->debug)
{
echo '<!-- params[readsess] = '.$params['readsess'].' -->'."\n";
echo '<!-- params[cd] = '.$params['cd'].' -->'."\n";
}
if(isset($GLOBALS['HTTP_GET_VARS']['readsess']))
{
@ -703,13 +709,18 @@
$params['cd'] = 0;
}
if($params != '' && @isset($params['readsess']))
if($this->debug)
{
echo '<!-- params[readsess] = '.$params['readsess'].' -->'."\n";
echo '<!-- params[cd] = '.$params['cd'].' -->'."\n";
}
if($params != '' && @is_array($params) && @isset($params['readsess']))
{
$event = $this->bo->restore_from_appsession;
$can_edit = True;
$this->edit_form(
Array(
'event' => $event,
'event' => $this->bo->restore_from_appsession(),
'cd' => $params['cd']
)
);
@ -3110,7 +3121,7 @@
. '<input type="hidden" name="cal[uid]" value="'.$event['uid'].'">'."\n"
. ($GLOBALS['HTTP_GET_VARS']['cal_id'] && $event['id'] == 0?'<input type="hidden" name="cal[reference]" value="'.$GLOBALS['HTTP_GET_VARS']['cal_id'].'">'."\n":
(@isset($event['reference'])?'<input type="hidden" name="cal[reference]" value="'.$event['reference'].'">'."\n":'')),
'errormsg' => ($params['cd']?$GLOBALS['phpgw']->common->check_code($params['cd']):'')
'errormsg' => ($param['cd']?$GLOBALS['phpgw']->common->check_code($param['cd']):'')
);
$p->set_var($vars);