phpgroupware-cvs
[Top][All Lists]
Advanced

[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.33.2.1
Date: Tue, 08 Apr 2003 15:48:45 -0400

Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv30547

Modified Files:
      Tag: Version-0_9_16-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.33.2.1
diff -C2 -r1.71.2.33 -r1.71.2.33.2.1
*** class.bocalendar.inc.php    7 Mar 2003 20:12:42 -0000       1.71.2.33
--- class.bocalendar.inc.php    8 Apr 2003 19:48:42 -0000       1.71.2.33.2.1
***************
*** 840,844 ****
                                );
                        }
- 
                        if($overlapping_events)
                        {
--- 840,843 ----
***************
*** 1029,1032 ****
--- 1028,1048 ----
                }
  
+               /*!
+               @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)
+                       {
+                               if ($event['participants'][$uid] != '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)
--- 1143,1157 ----
                                                        $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)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]