Changeset:
        57f215cabb52
        
https://sourceforge.net/p/mrbs/hg-code/ci/57f215cabb52883110fcc34b5d10d49f74435f48
Author:
        Campbell Morrison <cimorri...@hg.code.sf.net>
Date:
        Tue Mar 28 10:46:24 2017 +0100
Log message:

Fixed bug with calculation of slots

diffstat:

 web/index.php |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 82fd74de3edd -r 57f215cabb52 web/index.php
--- a/web/index.php     Tue Mar 28 09:35:30 2017 +0100
+++ b/web/index.php     Tue Mar 28 10:46:24 2017 +0100
@@ -91,7 +91,7 @@
                                           'name' => $entry['name'],
                                           'description' => 
$entry['description']);
           $slot = next($slots);
-        } while (($slot !== false) && ($entry['end_time'] > ($slot + 
$resolution)));
+        } while (($slot !== false) && ($entry['end_time'] > $slot));
         reset($slots);
         break;
       }
@@ -192,13 +192,12 @@
       elseif (count($data) == 1)
       {
         $this_id = $data[0]['id'];
-        $type = $data[0]['type'];
-        $content = "<a href=\"\">" . htmlspecialchars($data[0]['name']) . 
"</a>\n"; // JUST FOR NOW - TO DO
-        
         if (!isset($last_id))
         {
           // Start of a new booking
           $last_id = $this_id;
+          $type = $data[0]['type'];
+          $content = "<a href=\"\">" . htmlspecialchars($data[0]['name']) . 
"</a>\n"; // JUST FOR NOW - TO DO
           $n_slots = 1;
         }
         elseif ($this_id == $last_id)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mrbs-commits mailing list
Mrbs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to