Revision: 1970
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1970&view=rev
Author:   cimorrison
Date:     2011-09-21 08:34:36 +0000 (Wed, 21 Sep 2011)
Log Message:
-----------
Moved the de-duplication of rules and conflicts to before the Ajax output

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-21 08:25:33 UTC (rev 
1969)
+++ mrbs/trunk/web/edit_entry_handler.php       2011-09-21 08:34:36 UTC (rev 
1970)
@@ -560,7 +560,10 @@
 
 } // 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";

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