fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [16750] booking: keep booking elements from disappear


From: sigurdne
Subject: [Fmsystem-commits] [16750] booking: keep booking elements from disappearing from calendar
Date: Thu, 18 May 2017 08:30:29 -0400 (EDT)

Revision: 16750
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16750
Author:   sigurdne
Date:     2017-05-18 08:30:28 -0400 (Thu, 18 May 2017)
Log Message:
-----------
booking: keep booking elements from disappearing from calendar

Modified Paths:
--------------
    trunk/booking/inc/class.bobooking.inc.php

Modified: trunk/booking/inc/class.bobooking.inc.php
===================================================================
--- trunk/booking/inc/class.bobooking.inc.php   2017-05-18 04:24:39 UTC (rev 
16749)
+++ trunk/booking/inc/class.bobooking.inc.php   2017-05-18 12:30:28 UTC (rev 
16750)
@@ -1060,10 +1060,25 @@
 //                    echo $b['id']."\tfrom: ".substr($b['from_'],11,19)." to: 
".substr($b['to_'],11,19)."\n";
 //                    echo $e['id']."\tfrom: ".substr($e['from_'],11,19)." to: 
".substr($e['to_'],11,19)." ".$e['name']."\n";
 
-                                       if ((($b['from_'] >= $e['from_'] && 
$b['from_'] < $e['to_']) ||
+                                       if (
+                                               (
+                                               ($b['from_'] >= $e['from_'] && 
$b['from_'] < $e['to_']) ||
                                                ($b['to_'] > $e['from_'] && 
$b['to_'] <= $e['to_']) ||
-                                               ($b['from_'] <= $e['from_'] && 
$b['to_'] >= $e['to_'])) && (array_intersect($b['resources'], $e['resources']) 
!= array()))
+                                               ($b['from_'] <= $e['from_'] && 
$b['to_'] >= $e['to_'])
+                                               )
+                                               &&
+                                               
(array_intersect($b['resources'], $e['resources']) != array()))
                                        {
+                                               $test_intersect = 
array_intersect($e['resources'], $b['resources']);
+
+                                               $resources_to_keep = 
array_diff($b['resources'], $test_intersect);
+                                               if($resources_to_keep)
+                                               {
+                                                       $tmp =  $b;
+                                                       $tmp['resources'] = 
$resources_to_keep;
+                                                       $last[] = $tmp;
+                                               }
+
 //                        echo "##$i\n";
                                                $keep = false;
                                                $e['conflicts'][] = $b;




reply via email to

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