From 07e4e05d113dcc5a42643441d85391f21be6ac02 Mon Sep 17 00:00:00 2001 From: skeeter Date: Tue, 2 Oct 2001 01:13:53 +0000 Subject: [PATCH] Some fixes to possibly fix a problem with the uicalendar->page(). --- calendar/inc/class.bocalendar.inc.php | 12 +++++++++--- calendar/inc/class.uicalendar.inc.php | 12 ++++++------ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/calendar/inc/class.bocalendar.inc.php b/calendar/inc/class.bocalendar.inc.php index f4155042ae..86be6118bf 100755 --- a/calendar/inc/class.bocalendar.inc.php +++ b/calendar/inc/class.bocalendar.inc.php @@ -131,9 +131,12 @@ echo "Owner : ".$this->owner."
\n"; } - if(isset($GLOBALS['owner'])) + $owner = (isset($GLOBALS['HTTP_GET_VARS']['owner'])?$GLOBALS['HTTP_GET_VARS']['owner']:''); + $owner = ($owner=='' && isset($GLOBALS['HTTP_POST_VARS']['owner'])?$GLOBALS['HTTP_POST_VARS']['owner']:$owner); + + if(isset($owner)) { - $this->owner = intval($GLOBALS['owner']); + $this->owner = intval($owner); } elseif(!@isset($this->owner) || !@$this->owner) { @@ -154,7 +157,10 @@ $this->holiday_color = (substr($GLOBALS['phpgw_info']['theme']['bg07'],0,1)=='#'?'':'#').$GLOBALS['phpgw_info']['theme']['bg07']; - $this->printer_friendly = ($GLOBALS['friendly'] == 1?True:False); + $friendly = (isset($GLOBALS['HTTP_GET_VARS']['friendly'])?$GLOBALS['HTTP_GET_VARS']['friendly']:''); + $friendly = ($friendly=='' && isset($GLOBALS['HTTP_POST_VARS']['friendly'])?$GLOBALS['HTTP_POST_VARS']['friendly']:$friendly); + + $this->printer_friendly = (intval($friendly) == 1?True:False); if(isset($GLOBALS['HTTP_POST_VARS']['filter'])) { $this->filter = $GLOBALS['HTTP_POST_VARS']['filter']; } if(isset($GLOBALS['HTTP_POST_VARS']['cat_id'])) { $this->cat_id = $GLOBALS['HTTP_POST_VARS']['cat_id']; } diff --git a/calendar/inc/class.uicalendar.inc.php b/calendar/inc/class.uicalendar.inc.php index 69e050e432..c11a124ec7 100755 --- a/calendar/inc/class.uicalendar.inc.php +++ b/calendar/inc/class.uicalendar.inc.php @@ -1415,15 +1415,15 @@ $p->parse($row,$list,True); } - function page($page='',$params='') + function page($_page='',$params='') { - if($page == '') + if($_page == '') { $page_ = explode('.',$this->bo->prefs['calendar']['defaultcalendar']); - $page = $page_[0]; - if ($page=='index' || ($page != 'day' && $page != 'week' && $page != 'month' && $page != 'year')) + $_page = $page_[0]; + if ($_page=='index' || ($_page != 'day' && $_page != 'week' && $_page != 'month' && $_page != 'year')) { - $page = 'month'; + $_page = 'month'; $GLOBALS['phpgw']->preferences->add('calendar','defaultcalendar','month'); $GLOBALS['phpgw']->preferences->save_repository(); } @@ -1436,7 +1436,7 @@ { $page_app = $GLOBALS['phpgw_info']['flags']['currentapp']; } - return $GLOBALS['phpgw']->link('/index.php','menuaction='.$page_app.'.ui'.$page_app.'.'.$page.$params); + return $GLOBALS['phpgw']->link('/index.php','menuaction='.$page_app.'.ui'.$page_app.'.'.$_page.$params); } function header()