[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.15,
From: |
Mark A Peters <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.15,1.71.2.16 class.bopreferences.inc.php,1.2.2.2,1.2.2.3 class.uicalendar.inc.php,1.66.2.24,1.66.2.25 class.uipreferences.inc.php,1.2.2.4,1.2.2.5 |
Date: |
Sat, 21 Sep 2002 17:50:17 -0400 |
Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv32340/inc
Modified Files:
Tag: Version-0_9_14-branch
class.bocalendar.inc.php class.bopreferences.inc.php
class.uicalendar.inc.php class.uipreferences.inc.php
Log Message:
GNU Patch #495.
Index: class.bocalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.bocalendar.inc.php,v
retrieving revision 1.71.2.15
retrieving revision 1.71.2.16
diff -C2 -r1.71.2.15 -r1.71.2.16
*** class.bocalendar.inc.php 19 Sep 2002 23:45:04 -0000 1.71.2.15
--- class.bocalendar.inc.php 21 Sep 2002 21:50:13 -0000 1.71.2.16
***************
*** 135,139 ****
$this->grants =
$GLOBALS['phpgw']->acl->get_grants('calendar');
@reset($this->grants);
! if($this->debug)
{
if(floor(phpversion()) >= 4)
--- 135,139 ----
$this->grants =
$GLOBALS['phpgw']->acl->get_grants('calendar');
@reset($this->grants);
! if(DEBUG_APP)
{
if(floor(phpversion()) >= 4)
***************
*** 272,276 ****
$this->year = $year;
}
! else // if($this->year == 0)
{
$this->year = date('Y',$localtime);
--- 272,276 ----
$this->year = $year;
}
! else
{
$this->year = date('Y',$localtime);
***************
*** 280,284 ****
$this->month = $month;
}
! else // if($this->month == 0)
{
$this->month = date('m',$localtime);
--- 280,284 ----
$this->month = $month;
}
! else
{
$this->month = date('m',$localtime);
***************
*** 288,292 ****
$this->day = $day;
}
! else // if($this->day == 0)
{
$this->day = date('d',$localtime);
--- 288,292 ----
$this->day = $day;
}
! else
{
$this->day = date('d',$localtime);
***************
*** 303,315 ****
}
- // $this->today =
date('Ymd',$GLOBALS['phpgw']->datetime->gmtnow);
$this->today =
date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime);
! if($this->debug)
{
! echo '<!-- BO Filter : ('.$this->filter.')
-->'."\n";
! echo '<!-- Owner : '.$this->owner.' -->'."\n";
! echo '<!-- Today is : '.$this->today.'
-->'."\n";
!
if(floor(phpversion()) >= 4)
{
--- 303,313 ----
}
$this->today =
date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime);
! if(DEBUG_APP)
{
! print_debug('BO Filter','('.$this->filter.')');
! print_debug('Owner',$this->owner);
! print_debug('Today',$this->today);
if(floor(phpversion()) >= 4)
{
***************
*** 482,487 ****
$event['recur_exception'][] =
intval($exception_time);
$this->so->cal->event = $event;
! print_debug('exception
time',$event['recur_exception'][count($event['recur_exception']) -1]);
! print_debug('count event
exceptions',count($event['recur_exception']));
$this->so->add_entry($event);
$cd = 16;
--- 480,485 ----
$event['recur_exception'][] =
intval($exception_time);
$this->so->cal->event = $event;
! // print_debug('exception
time',$event['recur_exception'][count($event['recur_exception']) -1]);
! // print_debug('count event
exceptions',count($event['recur_exception']));
$this->so->add_entry($event);
$cd = 16;
***************
*** 716,725 ****
if($acct_type == 'u')
{
- // $part[$parts[$i]] = 1;
$part[intval($parts[$i])] = $accept_type;
}
elseif($acct_type == 'g')
{
- // $part[$parts[$i]] = 1;
$part[intval($parts[$i])] = $accept_type;
$groups[] = $parts[$i];
--- 714,721 ----
***************
*** 735,739 ****
while($member =
each($members))
{
- //
$part[$member[1]['account_id']] = 1;
$part[$member[1]['account_id']] = $accept_type;
}
--- 731,734 ----
***************
*** 781,788 ****
$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)
{
--- 776,780 ----
$this->store_to_appsession($event);
$datetime_check =
$this->validate_update($event);
! print_debug('bo->validated_update()
returnval',$datetime_check);
if($datetime_check)
{
***************
*** 837,858 ****
if(!$event['id'])
{
- if($this->debug)
- {
- echo '<!-- Creating a new
event. -->'."\n";
- }
$this->so->cal->event = $event;
$this->so->add_entry($event);
$this->send_update(MSG_ADDED,$event['participants'],'',$this->get_cached_event());
! if($this->debug)
! {
! echo '<!-- New event ID =
'.$event['id'].' -->'."\n";
! }
}
else
{
! if($this->debug)
! {
! echo '<!-- Updating an existing
event. -->'."\n";
! }
$new_event = $event;
$old_event =
$this->read_entry($event['id']);
--- 829,840 ----
if(!$event['id'])
{
$this->so->cal->event = $event;
$this->so->add_entry($event);
$this->send_update(MSG_ADDED,$event['participants'],'',$this->get_cached_event());
! print_debug('New Event
ID',$event['id']);
}
else
{
! print_debug('Updating Event
ID',$event['id']);
$new_event = $event;
$old_event =
$this->read_entry($event['id']);
***************
*** 1100,1196 ****
return $retval;
-
- // if($starttime == $endtime &&
$GLOBALS['phpgw']->common->show_date($starttime,'Hi') == 0)
- // {
- // $endtime =
mktime(23,59,59,$GLOBALS['phpgw']->common->show_date($starttime,'m'),$GLOBALS['phpgw']->common->show_date($starttime,'d')
+ 1,$GLOBALS['phpgw']->common->show_date($starttime,'Y')) -
$GLOBALS['phpgw']->datetime->tz_offset;
- // }
- //
- // - $sql = 'AND ((('.$starttime.' <= phpgw_cal.datetime)
AND ('.$endtime.' >= phpgw_cal.datetime) AND ('.$endtime.' <=
phpgw_cal.edatetime)) '
- // . 'OR (('.$starttime.' >=
phpgw_cal.datetime) AND ('.$starttime.' < phpgw_cal.edatetime) AND
('.$endtime.' >= phpgw_cal.edatetime)) '
- // - . 'OR (('.$starttime.' <=
phpgw_cal.datetime) AND ('.$endtime.' >= phpgw_cal.edatetime)) '
- // - . 'OR (('.$starttime.' >=
phpgw_cal.datetime) AND ('.$endtime.' <= phpgw_cal.edatetime))) ';
- //
- // if(count($participants) > 0)
- // {
- // $p_g = '';
- // if(count($participants))
- // {
- // $users = Array();
- // while(list($user,$status) =
each($participants))
- // {
- // $users[] = $user;
- // }
- // if($users)
- // {
- // $p_g .=
'phpgw_cal_user.cal_login IN ('.implode(',',$users).')';
- // }
- // }
- // if($p_g)
- // {
- // $sql .= ' AND (' . $p_g . ')';
- // }
- // }
- //
- // if(count($id) >= 1)
- // {
- // @reset($id);
- // $sql .= ' AND phpgw_cal.cal_id NOT IN
('.(count($id)==1?$id[0]:implode(',',$id)).')';
- // }
- //
- // $sql .= ' ORDER BY phpgw_cal.datetime ASC,
phpgw_cal.edatetime ASC, phpgw_cal.priority ASC';
- //
- // $events = $this->so->get_event_ids(False,$sql);
- // if($events == False)
- // {
- // return false;
- // }
- //
- // $db2 = $GLOBALS['phpgw']->db;
- //
- // for($i=0;$i<count($events);$i++)
- // {
- // $db2->query('SELECT recur_type FROM
phpgw_cal_repeats WHERE cal_id='.$events[$i],__LINE__,__FILE__);
- // if($db2->num_rows() == 0)
- // {
- // $retval[] = $events[$i];
- // $ok = True;
- // }
- // else
- // {
- // $db2->next_record();
- // if($db2->f('recur_type') <>
MCAL_RECUR_MONTHLY_MDAY)
- // {
- // $retval[] = $events[$i];
- // $ok = True;
- // }
- // }
- // }
- // if($ok == True)
- // {
- // return $retval;
- // }
- // else
- // {
- // return False;
- // }
}
- // function check_perms($needed,$user=0)
- // {
- // if($user == 0)
- // {
- // $allowed = !!($this->grants[$this->owner] &
$needed);
- // if($this->debug)
- // {
- // echo '<!-- Grantor: '.$this->owner.'
Rights: '.$this->grants[$this->owner].' Allowed: '.$allowed.'-->'."\n";
- // }
- // return $allowed;
- // }
- // else
- // {
- // return !!($this->grants[intval($user)] &
$needed);
- // }
- // }
-
function check_perms($needed,$event=0)
{
--- 1082,1087 ----
***************
*** 2095,2098 ****
--- 1986,2004 ----
}
+ //Added to construct the participant's list to an event
+ $event_participants = '';
+ reset($participants);
+ $ac=CreateObject('phpgwapi.accounts');
+
+ while(list($userid,$statid)=each($participants))
+ {
+ $event_participants .=
($event_participants?"\n":'');
+ $ac->account_id=$userid;
+ $ac->read_repository();
+ $event_participants .=
'<'.$ac->data['account_lid'].'> '.$ac->data['fullname'];
+ }
+ //End
+
+ reset($participants);
while($participants && list($userid,$statusid) =
each($participants))
{
***************
*** 2123,2127 ****
$to = $part_prefs['email']['address'];
! print_debug('Email being to',$to);
$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'] =
$part_prefs['common']['tz_offset'];
--- 2029,2033 ----
$to = $part_prefs['email']['address'];
! print_debug('Email being sent to',$to);
$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'] =
$part_prefs['common']['tz_offset'];
***************
*** 2129,2133 ****
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'] =
$part_prefs['common']['dateformat'];
! $new_tz_offset = ((60 * 60) *
intval($GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset']));
if($old_event != False)
--- 2035,2039 ----
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'] =
$part_prefs['common']['dateformat'];
! $GLOBALS['phpgw']->datetime->tz_offset
= ((60 * 60) *
intval($GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset']));
if($old_event != False)
***************
*** 2146,2157 ****
--- 2052,2069 ----
$action_date =
$old_event_date;
$body = lang ('Your
meeting scheduled for') .' '. $old_event_date .' '. lang('has been canceled');
+
$event_head=$old_event['title'];
+
$event_description=$old_event['description'];
break;
case MSG_MODIFIED:
$action_date =
$new_event_date;
$body = lang ('Your
meeting that had been scheduled for').' '.$old_event_date.' '. lang('has been
rescheduled to') .' '.$new_event_date;
+
$event_head=$old_event['title'];
+
$event_description=$old_event['description'];
break;
case MSG_ADDED:
$action_date =
$new_event_date;
$body = lang ('You have
a meeting scheduled for').' '. $new_event_date;
+
$event_head=$new_event['title'];
+
$event_description=$new_event['description'];
break;
case MSG_REJECTED:
***************
*** 2159,2166 ****
case MSG_ACCEPTED:
$action_date =
$old_event_date;
! $body = 'On
'.$GLOBALS['phpgw']->common->show_date(time() - $new_tz_offset).'
'.$GLOBALS['phpgw']->common->grab_owner_name($GLOBALS['phpgw_info']['user']['account_id']).'
'.$action.' your meeting request for '.$old_event_date;
break;
}
$subject = lang('Calendar Event') . '
('. lang($action) .') #'.$event_id.': '.$action_date.' (L)';
$returncode =
$send->msg('email',$to,$subject,$body,$msgtype,'','','',$sender);
}
--- 2071,2088 ----
case MSG_ACCEPTED:
$action_date =
$old_event_date;
! $body = 'On
'.$GLOBALS['phpgw']->common->show_date(time() -
$GLOBALS['phpgw']->datetime->tz_offset).'
'.$GLOBALS['phpgw']->common->grab_owner_name($GLOBALS['phpgw_info']['user']['account_id']).'
'.$action.' your meeting request for '.$old_event_date;
!
$event_head=$old_event['title'];
!
$event_description=$old_event['description'];
break;
}
$subject = lang('Calendar Event') . '
('. lang($action) .') #'.$event_id.': '.$action_date.' (L)';
+
if(isset($part_prefs['calendar']['send_extra']) &&
$part_prefs['calendar']['send_extra'])
+ {
+ $body .=
"\n\n".'***'.lang('Please confirm,accept,reject or examine changes in the
corresponding entry in your calendar').'***'."\n\n"
+ . '----'.lang('Event
Details Follow').'----';
+ $body .=
($event_head?"\n\n".lang('TITLE').':'."\n".' '.$event_head:'');
+ $body .=
($event_description?"\n\n".lang('DESCRIPTION').':'."\n".'
'.$event_description:'');
+ $body .=
($event_participants?"\n\n".lang('Participants').':'."\n".'
'.$event_participants:'');
+ }
$returncode =
$send->msg('email',$to,$subject,$body,$msgtype,'','','',$sender);
}
***************
*** 2175,2178 ****
--- 2097,2101 ----
$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'] =
$temp_tz_offset;
+ $GLBOALS['phpgw']->datetime->tz_offset = ((60 * 60) *
$temp_tz_offset);
$GLOBALS['phpgw_info']['user']['preferences']['common']['timeformat'] =
$temp_timeformat;
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'] =
$temp_dateformat;
Index: class.bopreferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.bopreferences.inc.php,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -C2 -r1.2.2.2 -r1.2.2.3
*** class.bopreferences.inc.php 19 Sep 2002 23:45:04 -0000 1.2.2.2
--- class.bopreferences.inc.php 21 Sep 2002 21:50:13 -0000 1.2.2.3
***************
*** 54,61 ****
--- 54,70 ----
{
$GLOBALS['phpgw']->preferences->add('calendar','send_updates',$GLOBALS['HTTP_POST_VARS']['prefs']['send_updates']);
+ if
($GLOBALS['HTTP_POST_VARS']['prefs']['send_extra'] == True)
+ {
+
$GLOBALS['phpgw']->preferences->add('calendar','send_extra',$GLOBALS['HTTP_POST_VARS']['prefs']['send_extra']);
+ }
+ else
+ {
+
$GLOBALS['phpgw']->preferences->delete('calendar','send_extra');
+ }
}
else
{
$GLOBALS['phpgw']->preferences->delete('calendar','send_updates');
+
$GLOBALS['phpgw']->preferences->delete('calendar','send_extra');
}
Index: class.uicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.66.2.24
retrieving revision 1.66.2.25
diff -C2 -r1.66.2.24 -r1.66.2.25
*** class.uicalendar.inc.php 19 Sep 2002 23:45:04 -0000 1.66.2.24
--- class.uicalendar.inc.php 21 Sep 2002 21:50:13 -0000 1.66.2.25
***************
*** 86,93 ****
$this->bo = CreateObject('calendar.bocalendar',1);
! if($this->debug)
! {
! echo "BO Owner : ".$this->bo->owner."<br>\n";
! }
$this->template = $GLOBALS['phpgw']->template;
--- 86,90 ----
$this->bo = CreateObject('calendar.bocalendar',1);
! print_debug('BO Owner',$this->bo->owner);
$this->template = $GLOBALS['phpgw']->template;
***************
*** 117,124 ****
}
! if($this->debug)
! {
! $this->_debug_sqsof();
! }
}
--- 114,118 ----
}
! print_debug('UI',$this->_debug_sqsof());
}
***************
*** 2176,2181 ****
'num_months' => $this->bo->num_months
);
! echo '<br>UI:';
! _debug_array($data);
}
--- 2170,2174 ----
'num_months' => $this->bo->num_months
);
! Return _debug_array($data,False);
}
Index: class.uipreferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uipreferences.inc.php,v
retrieving revision 1.2.2.4
retrieving revision 1.2.2.5
diff -C2 -r1.2.2.4 -r1.2.2.5
*** class.uipreferences.inc.php 19 Sep 2002 23:45:04 -0000 1.2.2.4
--- class.uipreferences.inc.php 21 Sep 2002 21:50:14 -0000 1.2.2.5
***************
*** 173,176 ****
--- 173,177 ----
$this->display_item(lang('Send/receive updates via
email'),'<input type="checkbox" name="prefs[send_updates]"
value="True"'.(@$this->bo->prefs['calendar']['send_updates']?'
checked':'').'>'."\n");
+ $this->display_item(lang('Receive extra information in
event mails'),'<input type="checkbox" name="prefs[send_extra]"
value="True"'.(@$this->bo->prefs['calendar']['send_extra']?'
checked':'').'>'."\n");
$this->display_item(lang('Display status of
events'),'<input type="checkbox" name="prefs[display_status]"
value="True"'.(@$this->bo->prefs['calendar']['display_status']?'
checked':'').'>'."\n");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.15,1.71.2.16 class.bopreferences.inc.php,1.2.2.2,1.2.2.3 class.uicalendar.inc.php,1.66.2.24,1.66.2.25 class.uipreferences.inc.php,1.2.2.4,1.2.2.5,
Mark A Peters <address@hidden> <=