This fixes a problem with editing single entries in a repeating event entry.

This commit is contained in:
skeeter 2001-10-05 03:09:55 +00:00
parent 64daeb29b6
commit 6f4c4a1d68
2 changed files with 7 additions and 5 deletions

View File

@ -182,7 +182,7 @@
$day = (isset($GLOBALS['HTTP_GET_VARS']['day'])?$GLOBALS['HTTP_GET_VARS']['day']:''); $day = (isset($GLOBALS['HTTP_GET_VARS']['day'])?$GLOBALS['HTTP_GET_VARS']['day']:'');
$day = ($day=='' && isset($GLOBALS['HTTP_POST_VARS']['day'])?$GLOBALS['HTTP_POST_VARS']['day']:''); $day = ($day=='' && isset($GLOBALS['HTTP_POST_VARS']['day'])?$GLOBALS['HTTP_POST_VARS']['day']:'');
if(isset($date) && $date) if(isset($date) && $date!='')
{ {
$this->year = intval(substr($date,0,4)); $this->year = intval(substr($date,0,4));
$this->month = intval(substr($date,4,2)); $this->month = intval(substr($date,4,2));
@ -190,7 +190,7 @@
} }
else else
{ {
if(isset($year) && $year) if(isset($year) && $year!='')
{ {
$this->year = $year; $this->year = $year;
} }
@ -198,7 +198,7 @@
{ {
$this->year = date('Y',time()); $this->year = date('Y',time());
} }
if(isset($month) && $month) if(isset($month) && $month!='')
{ {
$this->month = $month; $this->month = $month;
} }
@ -206,7 +206,7 @@
{ {
$this->month = date('m',time()); $this->month = date('m',time());
} }
if(isset($day) && $day) if(isset($day) && $day!='')
{ {
$this->day = $day; $this->day = $day;
} }

View File

@ -558,7 +558,9 @@
'action_url_button' => $this->page('edit','&cal_id='.$cal_id), 'action_url_button' => $this->page('edit','&cal_id='.$cal_id),
'action_text_button' => lang('Edit Single'), 'action_text_button' => lang('Edit Single'),
'action_confirm_button' => '', 'action_confirm_button' => '',
'action_extra_field' => '<input type="hidden" name="edit_type" value="single">' 'action_extra_field' => '<input type="hidden" name="edit_type" value="single">'."\n"
. '<input type="hidden" name="date" value="'.sprintf('%04d%02d%02d',$this->bo->year,$this->bo->month,$this->bo->day).'">'
); );
$p->set_var($var); $p->set_var($var);
echo $p->fp('out','form_button'); echo $p->fp('out','form_button');