Revision: 1968
http://mrbs.svn.sourceforge.net/mrbs/?rev=1968&view=rev
Author: tbleher
Date: 2011-09-21 06:13:41 +0000 (Wed, 21 Sep 2011)
Log Message:
-----------
edit_entry_handler: use array_merge instead of operator+ for array union
operator+ discards any members of the second array when their key is
already found in the first array. In contrast, array_merge renumbers
numeric arrays. The old behaviour led to some conflicts not being
displayed.
Modified Paths:
--------------
mrbs/trunk/web/edit_entry_handler.php
Modified: mrbs/trunk/web/edit_entry_handler.php
===================================================================
--- mrbs/trunk/web/edit_entry_handler.php 2011-09-20 20:45:24 UTC (rev
1967)
+++ mrbs/trunk/web/edit_entry_handler.php 2011-09-21 06:13:41 UTC (rev
1968)
@@ -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); // array union
}
// 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); // array
union
}
}
} // for
@@ -543,7 +543,7 @@
if (!empty($tmp))
{
$valid_booking = FALSE;
- $conflicts = $conflicts + $tmp; // array union
+ $conflicts = array_merge($conflicts, $tmp); // array union
}
// if we're not an admin for this room, check that the booking
// conforms to the booking policy
@@ -553,7 +553,7 @@
if (count($errors) > 0)
{
$valid_booking = FALSE;
- $rules_broken = $rules_broken + $errors; // Array union
+ $rules_broken = array_merged($rules_broken, $errors); // Array union
}
}
}
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