[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.33.
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.33.2.7,1.71.2.33.2.8 class.uicalendar.inc.php,1.66.2.55.2.11,1.66.2.55.2.12 |
Date: |
Thu, 29 May 2003 06:36:41 -0400 |
Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv9752
Modified Files:
Tag: Version-0_9_16-branch
class.bocalendar.inc.php class.uicalendar.inc.php
Log Message:
fix for missing view_add_day (bug #3728) and some other cleanups
Index: class.bocalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.bocalendar.inc.php,v
retrieving revision 1.71.2.33.2.7
retrieving revision 1.71.2.33.2.8
diff -C2 -r1.71.2.33.2.7 -r1.71.2.33.2.8
*** class.bocalendar.inc.php 20 May 2003 08:49:50 -0000 1.71.2.33.2.7
--- class.bocalendar.inc.php 29 May 2003 10:36:37 -0000 1.71.2.33.2.8
***************
*** 165,175 ****
$owner =
(isset($GLOBALS['owner'])?$GLOBALS['owner']:'');
! $owner =
(isset($GLOBALS['HTTP_GET_VARS']['owner'])?$GLOBALS['HTTP_GET_VARS']['owner']:$owner);
! $owner = ($owner=='' &&
isset($GLOBALS['HTTP_POST_VARS']['owner'])?$GLOBALS['HTTP_POST_VARS']['owner']:$owner);
!
ereg('menuaction=([a-zA-Z.]+)',$GLOBALS['HTTP_REFERER'],$regs);
$from = $regs[1];
! if ((substr($GLOBALS['PHP_SELF'],-8) == 'home.php' &&
substr($this->prefs['calendar']['defaultcalendar'],0,7) == 'planner'
! || $GLOBALS['HTTP_GET_VARS']['menuaction'] ==
'calendar.uicalendar.planner' &&
$from != 'calendar.uicalendar.planner' &&
!$this->save_owner)
&&
intval($this->prefs['calendar']['planner_start_with_group']) > 0)
--- 165,176 ----
$owner =
(isset($GLOBALS['owner'])?$GLOBALS['owner']:'');
! $owner = (isset($_GET['owner'])?$_GET['owner']:$owner);
! $owner = ($owner=='' &&
isset($_POST['owner'])?$_POST['owner']:$owner);
! $owner =
get_var('owner',array('GET','POST'),$GLOBALS['owner']);
!
ereg('menuaction=([a-zA-Z.]+)',$_SERVER['HTTP_REFERER'],$regs);
$from = $regs[1];
! if ((substr($_SERVER['PHP_SELF'],-8) == 'home.php' &&
substr($this->prefs['calendar']['defaultcalendar'],0,7) == 'planner'
! || $_GET['menuaction'] ==
'calendar.uicalendar.planner' &&
$from != 'calendar.uicalendar.planner' &&
!$this->save_owner)
&&
intval($this->prefs['calendar']['planner_start_with_group']) > 0)
***************
*** 180,189 ****
$owner =
'g_'.$this->prefs['calendar']['planner_start_with_group'];
}
! elseif ($GLOBALS['HTTP_GET_VARS']['menuaction'] !=
'calendar.uicalendar.planner' &&
$this->save_owner)
{
// leaving planner with an unchanged user/owner
==> setting owner back to save_owner
//
! $owner =
intval(isset($GLOBALS['HTTP_GET_VARS']['owner']) ?
$GLOBALS['HTTP_GET_VARS']['owner'] : $this->save_owner);
unset($this->save_owner);
}
--- 181,190 ----
$owner =
'g_'.$this->prefs['calendar']['planner_start_with_group'];
}
! elseif ($_GET['menuaction'] !=
'calendar.uicalendar.planner' &&
$this->save_owner)
{
// leaving planner with an unchanged user/owner
==> setting owner back to save_owner
//
! $owner = intval(isset($_GET['owner']) ?
$_GET['owner'] : $this->save_owner);
unset($this->save_owner);
}
***************
*** 224,235 ****
$this->holiday_color =
(substr($GLOBALS['phpgw_info']['theme']['bg07'],0,1)=='#'?'':'#').$GLOBALS['phpgw_info']['theme']['bg07'];
! $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']['sortby'])) {
$this->sortby = $GLOBALS['HTTP_POST_VARS']['sortby']; }
! if(isset($GLOBALS['HTTP_POST_VARS']['cat_id'])) {
$this->cat_id = $GLOBALS['HTTP_POST_VARS']['cat_id']; }
if(!isset($this->filter))
--- 225,236 ----
$this->holiday_color =
(substr($GLOBALS['phpgw_info']['theme']['bg07'],0,1)=='#'?'':'#').$GLOBALS['phpgw_info']['theme']['bg07'];
! $friendly =
(isset($_GET['friendly'])?$_GET['friendly']:'');
! $friendly = ($friendly=='' &&
isset($_POST['friendly'])?$_POST['friendly']:$friendly);
$this->printer_friendly = (intval($friendly) ==
1?True:False);
! if(isset($_POST['filter'])) { $this->filter =
$_POST['filter']; }
! if(isset($_POST['sortby'])) { $this->sortby =
$_POST['sortby']; }
! if(isset($_POST['cat_id'])) { $this->cat_id =
$_POST['cat_id']; }
if(!isset($this->filter))
***************
*** 256,276 ****
)
);
$localtime =
$GLOBALS['phpgw']->datetime->users_localtime;
$date = (isset($GLOBALS['date'])?$GLOBALS['date']:'');
! $date =
(isset($GLOBALS['HTTP_GET_VARS']['date'])?$GLOBALS['HTTP_GET_VARS']['date']:$date);
! $date = ($date=='' &&
isset($GLOBALS['HTTP_POST_VARS']['date'])?$GLOBALS['HTTP_POST_VARS']['date']:$date);
! $year =
(isset($GLOBALS['HTTP_GET_VARS']['year'])?$GLOBALS['HTTP_GET_VARS']['year']:'');
! $year = ($year=='' &&
isset($GLOBALS['HTTP_POST_VARS']['year'])?$GLOBALS['HTTP_POST_VARS']['year']:$year);
! $month =
(isset($GLOBALS['HTTP_GET_VARS']['month'])?$GLOBALS['HTTP_GET_VARS']['month']:'');
! $month = ($month=='' &&
isset($GLOBALS['HTTP_POST_VARS']['month'])?$GLOBALS['HTTP_POST_VARS']['month']:$month);
! $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']:'');
! $num_months =
(isset($GLOBALS['HTTP_GET_VARS']['num_months'])?$GLOBALS['HTTP_GET_VARS']['num_months']:'');
! $num_months = ($num_months=='' &&
isset($GLOBALS['HTTP_POST_VARS']['num_months'])?$GLOBALS['HTTP_POST_VARS']['num_months']:$num_months);
if(isset($date) && $date!='')
--- 257,306 ----
)
);
+ $this->rpt_day = array( // need to be after creation of
socalendar
+ MCAL_M_SUNDAY => 'Sunday',
+ MCAL_M_MONDAY => 'Monday',
+ MCAL_M_TUESDAY => 'Tuesday',
+ MCAL_M_WEDNESDAY => 'Wednesday',
+ MCAL_M_THURSDAY => 'Thursday',
+ MCAL_M_FRIDAY => 'Friday',
+ MCAL_M_SATURDAY => 'Saturday'
+ );
+ if($this->bo->prefs['calendar']['weekdaystarts'] !=
'Sunday')
+ {
+ $mcals = array_keys($this->rpt_day);
+ $days = array_values($this->rpt_day);
+ $this->rpt_day = array();
+ list($n) = $found =
array_keys($days,$this->prefs['calendar']['weekdaystarts']);
+ for ($i = 0; $i < 7; ++$i,++$n)
+ {
+ $this->rpt_day[$mcals[$n % 7]] =
$days[$n % 7];
+ }
+ }
+ $this->rpt_type = Array(
+ MCAL_RECUR_NONE => 'None',
+ MCAL_RECUR_DAILY => 'Daily',
+ MCAL_RECUR_WEEKLY => 'Weekly',
+ MCAL_RECUR_MONTHLY_WDAY => 'Monthly (by day)',
+ MCAL_RECUR_MONTHLY_MDAY => 'Monthly (by date)',
+ MCAL_RECUR_YEARLY => 'Yearly'
+ );
+
$localtime =
$GLOBALS['phpgw']->datetime->users_localtime;
$date = (isset($GLOBALS['date'])?$GLOBALS['date']:'');
! $date = (isset($_GET['date'])?$_GET['date']:$date);
! $date = ($date=='' &&
isset($_POST['date'])?$_POST['date']:$date);
! $year = (isset($_GET['year'])?$_GET['year']:'');
! $year = ($year=='' &&
isset($_POST['year'])?$_POST['year']:$year);
! $month = (isset($_GET['month'])?$_GET['month']:'');
! $month = ($month=='' &&
isset($_POST['month'])?$_POST['month']:$month);
! $day = (isset($_GET['day'])?$_GET['day']:'');
! $day = ($day=='' &&
isset($_POST['day'])?$_POST['day']:'');
! $num_months =
(isset($_GET['num_months'])?$_GET['num_months']:'');
! $num_months = ($num_months=='' &&
isset($_POST['num_months'])?$_POST['num_months']:$num_months);
if(isset($date) && $date!='')
***************
*** 624,633 ****
function update($params='')
{
! $l_cal = (@isset($params['cal']) &&
$params['cal']?$params['cal']:$GLOBALS['HTTP_POST_VARS']['cal']);
! $l_participants =
(@$params['participants']?$params['participants']:$GLOBALS['HTTP_POST_VARS']['participants']);
! $l_categories =
(@$params['categories']?$params['categories']:$GLOBALS['HTTP_POST_VARS']['categories']);
! $l_start = (@isset($params['start']) &&
$params['start']?$params['start']:$GLOBALS['HTTP_POST_VARS']['start']);
! $l_end = (@isset($params['end']) &&
$params['end']?$params['end']:$GLOBALS['HTTP_POST_VARS']['end']);
! $l_recur_enddate = (@isset($params['recur_enddate']) &&
$params['recur_enddate']?$params['recur_enddate']:$GLOBALS['HTTP_POST_VARS']['recur_enddate']);
$send_to_ui = True;
--- 654,663 ----
function update($params='')
{
! $l_cal = (@isset($params['cal']) &&
$params['cal']?$params['cal']:$_POST['cal']);
! $l_participants =
(@$params['participants']?$params['participants']:$_POST['participants']);
! $l_categories =
(@$params['categories']?$params['categories']:$_POST['categories']);
! $l_start = (@isset($params['start']) &&
$params['start']?$params['start']:$_POST['start']);
! $l_end = (@isset($params['end']) &&
$params['end']?$params['end']:$_POST['end']);
! $l_recur_enddate = (@isset($params['recur_enddate']) &&
$params['recur_enddate']?$params['recur_enddate']:$_POST['recur_enddate']);
$send_to_ui = True;
***************
*** 643,647 ****
print_debug('ID',$l_cal['id']);
! if(isset($GLOBALS['HTTP_GET_VARS']['readsess']))
{
$event = $this->restore_from_appsession();
--- 673,677 ----
print_debug('ID',$l_cal['id']);
! if(isset($_GET['readsess']))
{
$event = $this->restore_from_appsession();
***************
*** 723,726 ****
--- 753,763 ----
case MCAL_RECUR_WEEKLY:
$l_cal['recur_data'] =
intval($l_cal['rpt_sun']) + intval($l_cal['rpt_mon']) +
intval($l_cal['rpt_tue']) + intval($l_cal['rpt_wed']) +
intval($l_cal['rpt_thu']) + intval($l_cal['rpt_fri']) +
intval($l_cal['rpt_sat']);
+ if (is_array($l_cal['rpt_day']))
+ {
+ foreach
($l_cal['rpt_day'] as $mask)
+ {
+
$l_cal['recur_data'] |= intval($mask);
+ }
+ }
$this->so->set_recur_weekly(intval($l_recur_enddate['year']),intval($l_recur_enddate['month']),intval($l_recur_enddate['mday']),intval($l_cal['recur_interval']),$l_cal['recur_data']);
break;
***************
*** 2674,2686 ****
if($event['recur_type'] != MCAL_RECUR_NONE)
{
! $rpt_type = Array(
! MCAL_RECUR_NONE => 'none',
! MCAL_RECUR_DAILY => 'daily',
! MCAL_RECUR_WEEKLY => 'weekly',
! MCAL_RECUR_MONTHLY_WDAY =>
'monthlybyday',
! MCAL_RECUR_MONTHLY_MDAY =>
'monthlybydate',
! MCAL_RECUR_YEARLY => 'yearly'
! );
! $str = lang($rpt_type[$event['recur_type']]);
$str_extra = '';
--- 2711,2715 ----
if($event['recur_type'] != MCAL_RECUR_NONE)
{
! $str =
lang($this->rpt_type[$event['recur_type']]);
$str_extra = '';
***************
*** 2696,2741 ****
if($event['recur_type'] == MCAL_RECUR_WEEKLY ||
$event['recur_type'] == MCAL_RECUR_DAILY)
{
! $repeat_days = '';
!
if($this->bo->prefs['calendar']['weekdaystarts'] == 'Sunday')
! {
! if (!!($event['recur_data'] &
MCAL_M_SUNDAY) == True)
! {
!
$this->view_add_day(lang('Sunday'),$repeat_days);
! }
! }
! if (!!($event['recur_data'] &
MCAL_M_MONDAY) == True)
! {
!
$this->view_add_day(lang('Monday'),$repeat_days);
! }
! if (!!($event['recur_data'] &
MCAL_M_TUESDAY) == True)
! {
!
$this->view_add_day(lang('Tuesday'),$repeat_days);
! }
! if (!!($event['recur_data'] &
MCAL_M_WEDNESDAY) == True)
! {
!
$this->view_add_day(lang('Wednesday'),$repeat_days);
! }
! if (!!($event['recur_data'] &
MCAL_M_THURSDAY) == True)
! {
!
$this->view_add_day(lang('Thursday'),$repeat_days);
! }
! if (!!($event['recur_data'] &
MCAL_M_FRIDAY) == True)
! {
!
$this->view_add_day(lang('Friday'),$repeat_days);
! }
! if (!!($event['recur_data'] &
MCAL_M_SATURDAY) == True)
! {
!
$this->view_add_day(lang('Saturday'),$repeat_days);
! }
!
if($this->bo->prefs['calendar']['weekdaystarts'] != 'Sunday')
{
! if (!!($event['recur_data'] &
MCAL_M_SUNDAY) == True)
{
!
$this->view_add_day(lang('Sunday'),$repeat_days);
}
}
! if($repeat_days <> '')
{
! $str_extra .= lang('days
repeated').': '.$repeat_days;
}
}
--- 2725,2739 ----
if($event['recur_type'] == MCAL_RECUR_WEEKLY ||
$event['recur_type'] == MCAL_RECUR_DAILY)
{
! $repeat_days = array();
! foreach ($this->rpt_day as $mcal_mask
=> $dayname)
{
! if ($event['recur_data'] &
$mcal_mask)
{
! $repeat_days[] =
lang($dayname);
}
}
! if(count($repeat_days))
{
! $str_extra .= lang('days
repeated').': '.implode(', ',$repeat_days);
}
}
Index: class.uicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.66.2.55.2.11
retrieving revision 1.66.2.55.2.12
diff -C2 -r1.66.2.55.2.11 -r1.66.2.55.2.12
*** class.uicalendar.inc.php 19 May 2003 23:29:23 -0000 1.66.2.55.2.11
--- class.uicalendar.inc.php 29 May 2003 10:36:38 -0000 1.66.2.55.2.12
***************
*** 123,130 ****
{
// save return-fkt for add, view, ...
! list(,,$fkt) =
explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']);
if ($fkt == 'day' || $fkt == 'week' || $fkt ==
'month' || $fkt == 'year' || $fkt == 'planner')
{
! $this->bo->return_to =
$GLOBALS['HTTP_GET_VARS']['menuaction'].
sprintf('&date=%04d%02d%02d',$this->bo->year,$this->bo->month,$this->bo->day);
}
--- 123,130 ----
{
// save return-fkt for add, view, ...
! list(,,$fkt) = explode('.',$_GET['menuaction']);
if ($fkt == 'day' || $fkt == 'week' || $fkt ==
'month' || $fkt == 'year' || $fkt == 'planner')
{
! $this->bo->return_to =
$_GET['menuaction'].
sprintf('&date=%04d%02d%02d',$this->bo->year,$this->bo->month,$this->bo->day);
}
***************
*** 665,669 ****
$date = $cal_date?$cal_date:0;
! $date =
$date?$date:intval($GLOBALS['HTTP_GET_VARS']['date']);
// First, make sure they have permission to this entry
--- 665,669 ----
$date = $cal_date?$cal_date:0;
! $date = $date?$date:intval($_GET['date']);
// First, make sure they have permission to this entry
***************
*** 857,863 ****
}
! if(isset($GLOBALS['HTTP_GET_VARS']['readsess']))
{
! $params['readsess'] =
$GLOBALS['HTTP_GET_VARS']['readsess'];
$params['cd'] = 0;
}
--- 857,863 ----
}
! if(isset($_GET['readsess']))
{
! $params['readsess'] = $_GET['readsess'];
$params['cd'] = 0;
}
***************
*** 879,885 ****
);
}
! elseif(isset($GLOBALS['HTTP_GET_VARS']['cal_id']))
{
! $cal_id =
intval($GLOBALS['HTTP_GET_VARS']['cal_id']);
$event = $this->bo->read_entry($cal_id);
--- 879,885 ----
);
}
! elseif(isset($_GET['cal_id']))
{
! $cal_id = intval($_GET['cal_id']);
$event = $this->bo->read_entry($cal_id);
***************
*** 889,896 ****
$GLOBALS['phpgw']->common->phpgw_exit();
}
!
if(@isset($GLOBALS['HTTP_POST_VARS']['edit_type']) &&
$GLOBALS['HTTP_POST_VARS']['edit_type'] == 'single')
{
$event['id'] = 0;
!
$this->bo->set_recur_date($event,$GLOBALS['HTTP_POST_VARS']['date']);
$event['recur_type'] = MCAL_RECUR_NONE;
$event['recur_interval'] = 0;
--- 889,896 ----
$GLOBALS['phpgw']->common->phpgw_exit();
}
! if(@isset($_POST['edit_type']) &&
$_POST['edit_type'] == 'single')
{
$event['id'] = 0;
!
$this->bo->set_recur_date($event,$_POST['date']);
$event['recur_type'] = MCAL_RECUR_NONE;
$event['recur_interval'] = 0;
***************
*** 912,916 ****
function export($vcal_id=0)
{
! if(!isset($GLOBALS['HTTP_POST_VARS']['cal_id']) ||
!$GLOBALS['HTTP_POST_VARS']['cal_id'])
{
Header('Location: '.$this->index());
--- 912,916 ----
function export($vcal_id=0)
{
! if(!isset($_POST['cal_id']) || !$_POST['cal_id'])
{
Header('Location: '.$this->index());
***************
*** 919,923 ****
$GLOBALS['phpgw_info']['flags']['noappheader'] = True;
$GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
! if(!isset($GLOBALS['HTTP_POST_VARS']['output_file']) ||
!$GLOBALS['HTTP_POST_VARS']['output_file'])
{
unset($GLOBALS['phpgw_info']['flags']['noheader']);
--- 919,923 ----
$GLOBALS['phpgw_info']['flags']['noappheader'] = True;
$GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
! if(!isset($_POST['output_file']) ||
!$_POST['output_file'])
{
unset($GLOBALS['phpgw_info']['flags']['noheader']);
***************
*** 937,941 ****
'action_confirm_button' => '',
'action_extra_field' =>
"\n".lang('Enter Output Filename: ( .vcs appended )')."\n".' <input
name="output_file" size="25" maxlength="80" value="">'."\n"
! . ' <input type="hidden"
name="cal_id" value="'.$GLOBALS['HTTP_POST_VARS']['cal_id'].'">'
);
$p->set_var($var);
--- 937,941 ----
'action_confirm_button' => '',
'action_extra_field' =>
"\n".lang('Enter Output Filename: ( .vcs appended )')."\n".' <input
name="output_file" size="25" maxlength="80" value="">'."\n"
! . ' <input type="hidden"
name="cal_id" value="'.$_POST['cal_id'].'">'
);
$p->set_var($var);
***************
*** 944,948 ****
else
{
! $output_file =
$GLOBALS['HTTP_POST_VARS']['output_file'].'.vcs';
$vfs = CreateObject('phpgwapi.vfs');
//
if(!$vfs->file_exists('.calendar',array(RELATIVE_USER)))
--- 944,948 ----
else
{
! $output_file = $_POST['output_file'].'.vcs';
$vfs = CreateObject('phpgwapi.vfs');
//
if(!$vfs->file_exists('.calendar',array(RELATIVE_USER)))
***************
*** 953,957 ****
$content =
ExecMethod('calendar.boicalendar.export',
Array(
!
'l_event_id' => $GLOBALS['HTTP_POST_VARS']['cal_id'],
'chunk_split' => False,
)
--- 953,957 ----
$content =
ExecMethod('calendar.boicalendar.export',
Array(
!
'l_event_id' => $_POST['cal_id'],
'chunk_split' => False,
)
***************
*** 1084,1091 ****
}
$cal_id =
(isset($params['cal_id'])?intval($params['cal_id']):'');
! $cal_id =
($cal_id==''?intval($GLOBALS['HTTP_GET_VARS']['cal_id']):$cal_id);
$reinstate_index =
(isset($params['reinstate_index'])?intval($params['reinstate_index']):'');
! $reinstate_index =
($reinstate_index==''?intval($GLOBALS['HTTP_POST_VARS']['reinstate_index']):$reinstate_index);
if($this->debug)
{
--- 1084,1091 ----
}
$cal_id =
(isset($params['cal_id'])?intval($params['cal_id']):'');
! $cal_id = ($cal_id==''?intval($_GET['cal_id']):$cal_id);
$reinstate_index =
(isset($params['reinstate_index'])?intval($params['reinstate_index']):'');
! $reinstate_index =
($reinstate_index==''?intval($_POST['reinstate_index']):$reinstate_index);
if($this->debug)
{
***************
*** 1170,1174 ****
function delete()
{
! if(!isset($GLOBALS['HTTP_GET_VARS']['cal_id']))
{
Header('Location:
'.$this->page('','&date='.sprintf("%04d%02d%02d",$this->bo->year,$this->bo->month,$this->bo->day)));
--- 1170,1174 ----
function delete()
{
! if(!isset($_GET['cal_id']))
{
Header('Location:
'.$this->page('','&date='.sprintf("%04d%02d%02d",$this->bo->year,$this->bo->month,$this->bo->day)));
***************
*** 1177,1185 ****
$date =
sprintf("%04d%02d%02d",$this->bo->year,$this->bo->month,$this->bo->day);
!
if($this->bo->check_perms(PHPGW_ACL_DELETE,$cal_id=intval($GLOBALS['HTTP_GET_VARS']['cal_id'])))
{
!
if(isset($GLOBALS['HTTP_POST_VARS']['delete_type']) &&
$GLOBALS['HTTP_POST_VARS']['delete_type'] == 'single')
{
! $date =
$GLOBALS['HTTP_POST_VARS']['date'];
$cd = $this->bo->delete_single(
Array(
--- 1177,1185 ----
$date =
sprintf("%04d%02d%02d",$this->bo->year,$this->bo->month,$this->bo->day);
!
if($this->bo->check_perms(PHPGW_ACL_DELETE,$cal_id=intval($_GET['cal_id'])))
{
! if(isset($_POST['delete_type']) &&
$_POST['delete_type'] == 'single')
{
! $date = $_POST['date'];
$cd = $this->bo->delete_single(
Array(
***************
*** 1191,1195 ****
);
}
!
elseif((isset($GLOBALS['HTTP_POST_VARS']['delete_type']) &&
$GLOBALS['HTTP_POST_VARS']['delete_type'] == 'series') ||
!isset($GLOBALS['HTTP_POST_VARS']['delete_type']))
{
$cd = $this->bo->delete_entry($cal_id);
--- 1191,1195 ----
);
}
! elseif((isset($_POST['delete_type']) &&
$_POST['delete_type'] == 'series') || !isset($_POST['delete_type']))
{
$cd = $this->bo->delete_entry($cal_id);
***************
*** 1287,1291 ****
$GLOBALS['phpgw']->common->phpgw_header();
! $event =
$this->bo->read_entry($GLOBALS['HTTP_GET_VARS']['cal_id']);
reset($event['participants']);
--- 1287,1291 ----
$GLOBALS['phpgw']->common->phpgw_header();
! $event = $this->bo->read_entry($_GET['cal_id']);
reset($event['participants']);
***************
*** 1313,1317 ****
).'<br>';
! $event =
$this->bo->read_entry($GLOBALS['HTTP_GET_VARS']['cal_id']);
$this->view_event($event);
$GLOBALS['phpgw']->template->pfp('phpgw_body','view_event');
--- 1313,1317 ----
).'<br>';
! $event = $this->bo->read_entry($_GET['cal_id']);
$this->view_event($event);
$GLOBALS['phpgw']->template->pfp('phpgw_body','view_event');
***************
*** 1328,1332 ****
}
!
$this->bo->set_status(intval($GLOBALS['HTTP_GET_VARS']['cal_id']),intval($GLOBALS['HTTP_GET_VARS']['action']));
if ($this->bo->return_to)
--- 1328,1332 ----
}
!
$this->bo->set_status(intval($_GET['cal_id']),intval($_GET['action']));
if ($this->bo->return_to)
***************
*** 2056,2060 ****
$this->index();
}
! $participants =
$GLOBALS['HTTP_POST_VARS']['participants'];
$parts = Array();
$acct =
CreateObject('phpgwapi.accounts',$this->bo->owner);
--- 2056,2060 ----
$this->index();
}
! $participants = $_POST['participants'];
$parts = Array();
$acct =
CreateObject('phpgwapi.accounts',$this->bo->owner);
***************
*** 2095,2099 ****
$GLOBALS['phpgw']->common->phpgw_header();
! switch($GLOBALS['HTTP_POST_VARS']['matrixtype'])
{
case 'free/busy':
--- 2095,2099 ----
$GLOBALS['phpgw']->common->phpgw_header();
! switch($_POST['matrixtype'])
{
case 'free/busy':
***************
*** 2123,2127 ****
echo ' <input type="hidden" name="month"
value="'.$this->bo->month.'">'."\n";
echo ' <input type="hidden" name="day"
value="'.$this->bo->day.'">'."\n";
! echo ' <input type="hidden" name="matrixtype"
value="'.$GLOBALS['HTTP_POST_VARS']['matrixtype'].'">'."\n";
foreach($participants as $part)
{
--- 2123,2127 ----
echo ' <input type="hidden" name="month"
value="'.$this->bo->month.'">'."\n";
echo ' <input type="hidden" name="day"
value="'.$this->bo->day.'">'."\n";
! echo ' <input type="hidden" name="matrixtype"
value="'.$_POST['matrixtype'].'">'."\n";
foreach($participants as $part)
{
***************
*** 2137,2147 ****
function search()
{
! if (empty($GLOBALS['HTTP_POST_VARS']['keywords']))
{
// If we reach this, it is because they didn't
search for anything,
// attempt to send them back to where they
where.
Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php',array(
! 'menuaction' =>
$GLOBALS['HTTP_POST_VARS']['from'],
! 'date' =>
$GLOBALS['HTTP_POST_VARS']['year'].$GLOBALS['HTTP_POST_VARS']['month'].$GLOBALS['HTTP_POST_VARS']['day']
)));
$GLOBALS['phpgw']->common->phpgw_exit();
--- 2137,2147 ----
function search()
{
! if (empty($_POST['keywords']))
{
// If we reach this, it is because they didn't
search for anything,
// attempt to send them back to where they
where.
Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php',array(
! 'menuaction' => $_POST['from'],
! 'date' =>
$_POST['year'].$_POST['month'].$_POST['day']
)));
$GLOBALS['phpgw']->common->phpgw_exit();
***************
*** 2163,2167 ****
// This has been solved by the little icon indicator
for recurring events.
! $event_ids =
$this->bo->search_keywords($GLOBALS['HTTP_POST_VARS']['keywords']);
$ids = Array();
foreach($event_ids as $key => $id)
--- 2163,2167 ----
// This has been solved by the little icon indicator
for recurring events.
! $event_ids =
$this->bo->search_keywords($_POST['keywords']);
$ids = Array();
foreach($event_ids as $key => $id)
***************
*** 2326,2330 ****
function footer()
{
! $menuaction = $GLOBALS['HTTP_GET_VARS']['menuaction'];
list(,,$method) = explode('.',$menuaction);
--- 2326,2330 ----
function footer()
{
! $menuaction = $_GET['menuaction'];
list(,,$method) = explode('.',$menuaction);
***************
*** 2429,2435 ****
$date_str = '';
! if(isset($GLOBALS['HTTP_GET_VARS']['date']) &&
$GLOBALS['HTTP_GET_VARS']['date'])
{
! $date_str .= ' <input type="hidden"
name="date" value="'.$GLOBALS['HTTP_GET_VARS']['date'].'">'."\n";
}
$date_str .= ' <input type="hidden"
name="month" value="'.$this->bo->month.'">'."\n";
--- 2429,2435 ----
$date_str = '';
! if(isset($_GET['date']) && $_GET['date'])
{
! $date_str .= ' <input type="hidden"
name="date" value="'.$_GET['date'].'">'."\n";
}
$date_str .= ' <input type="hidden"
name="month" value="'.$this->bo->month.'">'."\n";
***************
*** 3102,3114 ****
}
- function view_add_day($day,&$repeat_days)
- {
- if($repeat_days)
- {
- $repeat_days .= ', ';
- }
- $repeat_days .= $day.' ';
- }
-
function view_event($event,$alarms=False)
{
--- 3102,3105 ----
***************
*** 3131,3135 ****
$vars = $this->bo->event2array($event);
! $vars['title']['data']['tr_color'] =
$this->theme['th_bg'];
foreach($vars['participants']['data'] as $user => $str)
--- 3122,3126 ----
$vars = $this->bo->event2array($event);
! $vars['title']['tr_color'] = $this->theme['th_bg'];
foreach($vars['participants']['data'] as $user => $str)
***************
*** 3664,3668 ****
. '<input type="hidden" name="cal[owner]" value="'.$event['owner'].'">'."\n"
. '<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":''))
. (@isset($GLOBALS['phpgw_info']['server']['deny_user_grants_access']) &&
$GLOBALS['phpgw_info']['server']['deny_user_grants_access']?
--- 3655,3659 ----
. '<input type="hidden" name="cal[owner]" value="'.$event['owner'].'">'."\n"
. '<input type="hidden" name="cal[uid]" value="'.$event['uid'].'">'."\n"
!
. ($_GET['cal_id'] && $event['id'] == 0?'<input type="hidden"
name="cal[reference]" value="'.$_GET['cal_id'].'">'."\n":
(@isset($event['reference'])?'<input type="hidden" name="cal[reference]"
value="'.$event['reference'].'">'."\n":''))
. (@isset($GLOBALS['phpgw_info']['server']['deny_user_grants_access']) &&
$GLOBALS['phpgw_info']['server']['deny_user_grants_access']?
***************
*** 3884,3897 ****
$p->set_var('hr_text','<center><b>'.lang('Repeating
Event Information').'</b></center>');
$p->parse('row','hr',True);
- $rpt_type = Array(
- MCAL_RECUR_NONE => 'None',
- MCAL_RECUR_DAILY => 'Daily',
- MCAL_RECUR_WEEKLY => 'Weekly',
- MCAL_RECUR_MONTHLY_WDAY => 'Monthly (by day)',
- MCAL_RECUR_MONTHLY_MDAY => 'Monthly (by date)',
- MCAL_RECUR_YEARLY => 'Yearly'
- );
$str = '';
! foreach($rpt_type as $type => $label)
{
$str .= '<option
value="'.$type.'"'.($event['recur_type']==$type?'
selected':'').'>'.lang($label).'</option>';
--- 3875,3880 ----
$p->set_var('hr_text','<center><b>'.lang('Repeating
Event Information').'</b></center>');
$p->parse('row','hr',True);
$str = '';
! foreach($this->bo->rpt_type as $type => $label)
{
$str .= '<option
value="'.$type.'"'.($event['recur_type']==$type?'
selected':'').'>'.lang($label).'</option>';
***************
*** 3923,3935 ****
);
$var[] = Array(
'field' => lang('Repeat Day').'<br>'.lang('(for
weekly)'),
! 'data' => '<input type="checkbox"
name="cal[rpt_sun]" value="'.MCAL_M_SUNDAY.'"'.(($event['recur_data'] &
MCAL_M_SUNDAY) ?' checked':'').'> '.lang('Sunday').' '
! . '<input type="checkbox"
name="cal[rpt_mon]" value="'.MCAL_M_MONDAY.'"'.(($event['recur_data'] &
MCAL_M_MONDAY) ?' checked':'').'> '.lang('Monday').' '
! . '<input type="checkbox" name="cal[rpt_tue]"
value="'.MCAL_M_TUESDAY.'"'.(($event['recur_data'] & MCAL_M_TUESDAY) ?'
checked':'').'> '.lang('Tuesday').' '
! . '<input type="checkbox" name="cal[rpt_wed]"
value="'.MCAL_M_WEDNESDAY.'"'.(($event['recur_data'] & MCAL_M_WEDNESDAY) ?'
checked':'').'> '.lang('Wednesday').' <br>'
! . '<input type="checkbox" name="cal[rpt_thu]"
value="'.MCAL_M_THURSDAY.'"'.(($event['recur_data'] & MCAL_M_THURSDAY) ?'
checked':'').'> '.lang('Thursday').' '
! . '<input type="checkbox" name="cal[rpt_fri]"
value="'.MCAL_M_FRIDAY.'"'.(($event['recur_data'] & MCAL_M_FRIDAY) ?'
checked':'').'> '.lang('Friday').' '
! . '<input type="checkbox" name="cal[rpt_sat]"
value="'.MCAL_M_SATURDAY.'"'.(($event['recur_data'] & MCAL_M_SATURDAY) ?'
checked':'').'> '.lang('Saturday').' '
);
--- 3906,3918 ----
);
+ $i = 0; $boxes = '';
+ foreach ($this->bo->rpt_day as $mask => $name)
+ {
+ $boxes .= '<input type="checkbox"
name="cal[rpt_day][]" value="'.$mask.'"'.($event['recur_data'] & $mask ? '
checked' : '').'> '.lang($name)."\n";
+ if (++$i == 5) $boxes .= '<br>';
+ }
$var[] = Array(
'field' => lang('Repeat Day').'<br>'.lang('(for
weekly)'),
! 'data' => $boxes
);
***************
*** 4015,4027 ****
$p->set_var('text_add_name',$add_ext);
! if(isset($GLOBALS['HTTP_GET_VARS']['part']) &&
$GLOBALS['HTTP_GET_VARS']['part'])
{
! $control_data['part'] = split(",",
$GLOBALS['HTTP_GET_VARS']['part']);
}
else
{
! $control_data['part'] =
$GLOBALS['HTTP_POST_VARS']['participant'];
! $control_data['action'] =
$GLOBALS['HTTP_POST_VARS']['action'];
! $control_data['delete'] =
$GLOBALS['HTTP_POST_VARS']['delete'];
}
--- 3998,4010 ----
$p->set_var('text_add_name',$add_ext);
! if(isset($_GET['part']) && $_GET['part'])
{
! $control_data['part'] = split(",",
$_GET['part']);
}
else
{
! $control_data['part'] = $_POST['participant'];
! $control_data['action'] = $_POST['action'];
! $control_data['delete'] = $_POST['delete'];
}
***************
*** 4046,4050 ****
if ($control_data['action'] == lang('Add Contact'))
{
! $id = $GLOBALS['HTTP_POST_VARS']['id_addr'];
if (isset($id) && intval($id) != 0)
{
--- 4029,4033 ----
if ($control_data['action'] == lang('Add Contact'))
{
! $id = $_POST['id_addr'];
if (isset($id) && intval($id) != 0)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.33.2.7,1.71.2.33.2.8 class.uicalendar.inc.php,1.66.2.55.2.11,1.66.2.55.2.12,
Ralf Becker <address@hidden> <=