[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,1.71.2.34 |
Date: |
Tue, 08 Apr 2003 17:23:56 -0400 |
Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv32249
Modified Files:
Tag: Version-0_9_14-branch
class.bocalendar.inc.php
Log Message:
rejected events are no longer produceing conflicts
Index: class.bocalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.bocalendar.inc.php,v
retrieving revision 1.71.2.33
retrieving revision 1.71.2.34
diff -C2 -r1.71.2.33 -r1.71.2.34
*** class.bocalendar.inc.php 7 Mar 2003 20:12:42 -0000 1.71.2.33
--- class.bocalendar.inc.php 8 Apr 2003 21:23:54 -0000 1.71.2.34
***************
*** 840,844 ****
);
}
-
if($overlapping_events)
{
--- 840,843 ----
***************
*** 1029,1032 ****
--- 1028,1050 ----
}
+ /*!
+ @function participants_not_rejected($participants,$event)
+ @abstract checks if any of the $particpants participates in
$event and has not rejected it
+ */
+ function participants_not_rejected($participants,$event)
+ {
+ //echo "participants_not_rejected()<br>participants
=<pre>"; print_r($participants); echo "</pre><br>event[participants]=<pre>";
print_r($event['participants']); echo "</pre>\n";
+ foreach($participants as $uid => $status)
+ {
+ //echo "testing event[participants][uid=$uid] =
'".$event['participants'][$uid]."'<br>\n";
+ if (isset($event['participants'][$uid]) &&
$event['participants'][$uid] != 'R' &&
+ $status != 'R')
+ {
+ return True; // found not rejected
participant in event
+ }
+ }
+ return False;
+ }
+
function
overlap($starttime,$endtime,$participants,$owner=0,$id=0,$restore_cache=False)
{
***************
*** 1127,1134 ****
$temp_event_end =
sprintf("%d%02d",$event['end']['hour'],$event['end']['min']);
// if((($temp_start_time
<= $temp_event_start) && ($temp_end_time >= $temp_event_start) &&
($temp_end_time <= $temp_event_end)) ||
! if((($temp_start_time
<= $temp_event_start) && ($temp_end_time > $temp_event_start) &&
($temp_end_time <= $temp_event_end)) ||
!
(($temp_start_time >= $temp_event_start) && ($temp_start_time <
$temp_event_end) && ($temp_end_time >= $temp_event_end)) ||
!
(($temp_start_time <= $temp_event_start) && ($temp_end_time >=
$temp_event_end)) ||
!
(($temp_start_time >= $temp_event_start) && ($temp_end_time <=
$temp_event_end)))
{
if($this->debug)
--- 1145,1159 ----
$temp_event_end =
sprintf("%d%02d",$event['end']['hour'],$event['end']['min']);
// if((($temp_start_time
<= $temp_event_start) && ($temp_end_time >= $temp_event_start) &&
($temp_end_time <= $temp_event_end)) ||
! if(($temp_start_time <=
$temp_event_start &&
! $temp_end_time >
$temp_event_start &&
! $temp_end_time <=
$temp_event_end ||
! $temp_start_time >=
$temp_event_start &&
! $temp_start_time <
$temp_event_end &&
! $temp_end_time >=
$temp_event_end ||
! $temp_start_time <=
$temp_event_start &&
! $temp_end_time >=
$temp_event_end ||
! $temp_start_time >=
$temp_event_start &&
! $temp_end_time <=
$temp_event_end) &&
!
$this->participants_not_rejected($participants,$event))
{
if($this->debug)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.33,1.71.2.34,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: filemanager/templates/default index.xsl,1.1,1.2
- Next by Date:
[Phpgroupware-cvs] CVS: bookmarks/setup phpgw_en.lang,1.5.2.7,1.5.2.8 phpgw_fr.lang,1.4.2.4,1.4.2.5
- Previous by thread:
[Phpgroupware-cvs] CVS: filemanager/templates/default index.xsl,1.1,1.2
- Next by thread:
[Phpgroupware-cvs] CVS: bookmarks/setup phpgw_en.lang,1.5.2.7,1.5.2.8 phpgw_fr.lang,1.4.2.4,1.4.2.5
- Index(es):