mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
Fix for a reference malfunction, and a fix to disallow the owner of the event to reject his participation status.
This commit is contained in:
parent
3bf1728dc6
commit
864d201ed5
@ -347,7 +347,6 @@
|
|||||||
$l_start = ($params['start']?$params['start']:$GLOBALS['HTTP_POST_VARS']['start']);
|
$l_start = ($params['start']?$params['start']:$GLOBALS['HTTP_POST_VARS']['start']);
|
||||||
$l_end = ($params['end']?$params['end']:$GLOBALS['HTTP_POST_VARS']['end']);
|
$l_end = ($params['end']?$params['end']:$GLOBALS['HTTP_POST_VARS']['end']);
|
||||||
$l_recur_enddate = ($params['recur_enddate']?$params['recur_enddate']:$GLOBALS['HTTP_POST_VARS']['recur_enddate']);
|
$l_recur_enddate = ($params['recur_enddate']?$params['recur_enddate']:$GLOBALS['HTTP_POST_VARS']['recur_enddate']);
|
||||||
$l_reference = ($params['reference']?$params['reference']:$GLOBALS['HTTP_POST_VARS']['reference']);
|
|
||||||
|
|
||||||
$send_to_ui = True;
|
$send_to_ui = True;
|
||||||
if($p_cal || $p_participants || $p_start || $p_end || $p_recur_enddata)
|
if($p_cal || $p_participants || $p_start || $p_end || $p_recur_enddata)
|
||||||
@ -404,7 +403,7 @@
|
|||||||
$this->so->set_start($l_start['year'],$l_start['month'],$l_start['mday'],$l_start['hour'],$l_start['min'],0);
|
$this->so->set_start($l_start['year'],$l_start['month'],$l_start['mday'],$l_start['hour'],$l_start['min'],0);
|
||||||
$this->so->set_end($l_end['year'],$l_end['month'],$l_end['mday'],$l_end['hour'],$l_end['min'],0);
|
$this->so->set_end($l_end['year'],$l_end['month'],$l_end['mday'],$l_end['hour'],$l_end['min'],0);
|
||||||
$this->so->set_class($is_public);
|
$this->so->set_class($is_public);
|
||||||
$this->so->add_attribute('reference',($l_reference?$l_reference:0));
|
$this->so->add_attribute('reference',$l_cal['reference']);
|
||||||
if($l_cal['id'])
|
if($l_cal['id'])
|
||||||
{
|
{
|
||||||
$this->so->add_attribute('id',$l_cal['id']);
|
$this->so->add_attribute('id',$l_cal['id']);
|
||||||
|
@ -2659,6 +2659,7 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$ev = $this->bo->get_cached_event();
|
||||||
$response_choices = Array(
|
$response_choices = Array(
|
||||||
ACCEPTED => lang('Accept'),
|
ACCEPTED => lang('Accept'),
|
||||||
REJECTED => lang('Reject'),
|
REJECTED => lang('Reject'),
|
||||||
@ -2668,14 +2669,17 @@
|
|||||||
$str = '';
|
$str = '';
|
||||||
while(list($param,$text) = each($response_choices))
|
while(list($param,$text) = each($response_choices))
|
||||||
{
|
{
|
||||||
$var = Array(
|
if(!($param == REJECTED && $ev['owner'] == $this->bo->owner))
|
||||||
'action_url_button' => $this->page('set_action','&cal_id='.$cal_id.'&action='.$param),
|
{
|
||||||
'action_text_button' => ' '.$text.' ',
|
$var = Array(
|
||||||
'action_confirm_button' => '',
|
'action_url_button' => $this->page('set_action','&cal_id='.$cal_id.'&action='.$param),
|
||||||
'action_extra_field' => ''
|
'action_text_button' => ' '.$text.' ',
|
||||||
);
|
'action_confirm_button' => '',
|
||||||
$p->set_var($var);
|
'action_extra_field' => ''
|
||||||
$str .= '<td>'.$p->fp('out','form_button').'</td>'."\n";
|
);
|
||||||
|
$p->set_var($var);
|
||||||
|
$str .= '<td>'.$p->fp('out','form_button').'</td>'."\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return '<table width="100%" cols="4"><tr align="center">'."\n".$str.'</tr></table>'."\n";
|
return '<table width="100%" cols="4"><tr align="center">'."\n".$str.'</tr></table>'."\n";
|
||||||
}
|
}
|
||||||
@ -2720,7 +2724,8 @@
|
|||||||
'action_url' => $GLOBALS['phpgw']->link('/index.php',Array('menuaction'=>'calendar.bocalendar.update')),
|
'action_url' => $GLOBALS['phpgw']->link('/index.php',Array('menuaction'=>'calendar.bocalendar.update')),
|
||||||
'common_hidden' => '<input type="hidden" name="cal[id]" value="'.$event['id'].'">'."\n"
|
'common_hidden' => '<input type="hidden" name="cal[id]" value="'.$event['id'].'">'."\n"
|
||||||
. '<input type="hidden" name="cal[owner]" value="'.$this->bo->owner.'">'."\n"
|
. '<input type="hidden" name="cal[owner]" value="'.$this->bo->owner.'">'."\n"
|
||||||
. ($GLOBALS['HTTP_GET_VARS']['cal_id'] && $event['id'] == 0?'<input type="hidden" name="reference" value="'.$GLOBALS['HTTP_GET_VARS']['cal_id'].'">'."\n":''),
|
. ($GLOBALS['HTTP_GET_VARS']['cal_id'] && $event['id'] == 0?'<input type="hidden" name="cal[reference]" value="'.$GLOBALS['HTTP_GET_VARS']['cal_id'].'">'."\n":
|
||||||
|
($event['reference']?'<input type="hidden" name="cal[reference]" value="'.$event['reference'].'">'."\n":'')),
|
||||||
'errormsg' => ($params['cd']?$GLOBALS['phpgw']->common->check_code($params['cd']):'')
|
'errormsg' => ($params['cd']?$GLOBALS['phpgw']->common->check_code($params['cd']):'')
|
||||||
);
|
);
|
||||||
$p->set_var($vars);
|
$p->set_var($vars);
|
||||||
|
Loading…
Reference in New Issue
Block a user