Revision: 1971
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1971&view=rev
Author:   cimorrison
Date:     2011-09-21 08:41:56 +0000 (Wed, 21 Sep 2011)
Log Message:
-----------
Merged in latest changes from the trunk

Modified Paths:
--------------
    mrbs/branches/datatables/web/edit_entry_handler.php

Property Changed:
----------------
    mrbs/branches/datatables/
    mrbs/branches/datatables/web/upgrade/5/pgsql.sql


Property changes on: mrbs/branches/datatables
___________________________________________________________________
Modified: svn:mergeinfo
   - /mrbs/branches/custom_entry_fields:1374-1396
/mrbs/branches/datepicker:1409-1416
/mrbs/branches/disabled_rooms:1601-1634
/mrbs/branches/from_to_bookings:1491-1587
/mrbs/branches/ics_attachments:1652-1741
/mrbs/branches/improve_css_2008_06:804-872
/mrbs/branches/only_unicode:1747-1749
/mrbs/branches/provisional_bookings:1242-1280
/mrbs/branches/provisional_bookings_new_style:1407-1570
/mrbs/trunk:1863-1966
   + /mrbs/branches/custom_entry_fields:1374-1396
/mrbs/branches/datepicker:1409-1416
/mrbs/branches/disabled_rooms:1601-1634
/mrbs/branches/from_to_bookings:1491-1587
/mrbs/branches/ics_attachments:1652-1741
/mrbs/branches/improve_css_2008_06:804-872
/mrbs/branches/only_unicode:1747-1749
/mrbs/branches/provisional_bookings:1242-1280
/mrbs/branches/provisional_bookings_new_style:1407-1570
/mrbs/trunk:1863-1970

Modified: mrbs/branches/datatables/web/edit_entry_handler.php
===================================================================
--- mrbs/branches/datatables/web/edit_entry_handler.php 2011-09-21 08:34:36 UTC 
(rev 1970)
+++ mrbs/branches/datatables/web/edit_entry_handler.php 2011-09-21 08:41:56 UTC 
(rev 1971)
@@ -515,7 +515,7 @@
           // In both cases remember the conflict data.   (We don't at the
           // moment do anything with the data if we're skipping, but we might
           // in the future want to display a list of bookings we've skipped 
past)
-          $conflicts = $conflicts + $tmp;  // array union
+          $conflicts = array_merge($conflicts, $tmp);
         }
         // if we're not an admin for this room, check that the booking
         // conforms to the booking policy
@@ -525,7 +525,7 @@
           if (count($errors) > 0)
           {
             $valid_booking = FALSE;
-            $rules_broken = $rules_broken + $errors;  // array union
+            $rules_broken = array_merge($rules_broken, $errors);
           }
         }
       } // for
@@ -543,7 +543,7 @@
     if (!empty($tmp))
       {
         $valid_booking = FALSE;
-        $conflicts = $conflicts + $tmp;  // array union
+        $conflicts = array_merge($conflicts, $tmp);
       }
       // if we're not an admin for this room, check that the booking
       // conforms to the booking policy
@@ -553,14 +553,17 @@
         if (count($errors) > 0)
         {
           $valid_booking = FALSE;
-          $rules_broken = $rules_broken + $errors;  // Array union
+          $rules_broken = array_merge($rules_broken, $errors);
         }
       }
   }
 
 } // end foreach rooms
 
-
+// Tidy up the lists of conflicts and rules broken, getting rid of duplicates
+$conflicts = array_values(array_unique($conflicts));
+$rules_broken = array_values(array_unique($rules_broken));
+    
 // If this is an Ajax request then we're just trying to find out whether the 
booking
 // would succeed if made.   We now know that, so output the results and exit.
 if ($ajax && function_exists('json_encode'))
@@ -765,8 +768,6 @@
     echo get_vocab("rules_broken") . ":\n";
     echo "</p>\n";
     echo "<ul>\n";
-    // get rid of duplicate messages
-    $rules_broken = array_unique($rules_broken);
     foreach ($rules_broken as $rule)
     {
       echo "<li>$rule</li>\n";
@@ -779,8 +780,6 @@
     echo get_vocab("conflict").":\n";
     echo "</p>\n";
     echo "<ul>\n";
-    // get rid of duplicate messages
-    $conflicts = array_unique($conflicts);
     foreach ($conflicts as $conflict)
     {
       echo "<li>$conflict</li>\n";


Property changes on: mrbs/branches/datatables/web/upgrade/5/pgsql.sql
___________________________________________________________________
Modified: svn:mergeinfo
   - /mrbs/branches/custom_entry_fields/web/upgrade/5/pgsql.sql:1374-1396
/mrbs/branches/datepicker/web/upgrade/5/pgsql.sql:1409-1416
/mrbs/branches/disabled_rooms/web/upgrade/5/pgsql.sql:1601-1634
/mrbs/branches/from_to_bookings/web/upgrade/5/pgsql.sql:1491-1587
/mrbs/branches/ics_attachments/web/upgrade/5/pgsql.sql:1652-1741
/mrbs/branches/only_unicode/web/upgrade/5/pgsql.sql:1747-1749
/mrbs/branches/provisional_bookings/web/upgrade/5/pgsql.sql:1242-1280
/mrbs/branches/provisional_bookings_new_style/web/upgrade/5/pgsql.sql:1407-1570
/mrbs/trunk/web/upgrade/5/pgsql.sql:1863-1966
   + /mrbs/branches/custom_entry_fields/web/upgrade/5/pgsql.sql:1374-1396
/mrbs/branches/datepicker/web/upgrade/5/pgsql.sql:1409-1416
/mrbs/branches/disabled_rooms/web/upgrade/5/pgsql.sql:1601-1634
/mrbs/branches/from_to_bookings/web/upgrade/5/pgsql.sql:1491-1587
/mrbs/branches/ics_attachments/web/upgrade/5/pgsql.sql:1652-1741
/mrbs/branches/only_unicode/web/upgrade/5/pgsql.sql:1747-1749
/mrbs/branches/provisional_bookings/web/upgrade/5/pgsql.sql:1242-1280
/mrbs/branches/provisional_bookings_new_style/web/upgrade/5/pgsql.sql:1407-1570
/mrbs/trunk/web/upgrade/5/pgsql.sql:1863-1970

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to