Revision: 1280
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1280&view=rev
Author:   cimorrison
Date:     2009-12-09 21:02:28 +0000 (Wed, 09 Dec 2009)

Log Message:
-----------
Changed day/week/month views so that the status of bookings is ignored if 
$provisional_enabled is FALSE (ie even if a booking is set as provisional in 
the database it is displayed as an ordinary booking).

Modified Paths:
--------------
    mrbs/branches/provisional_bookings/web/functions.inc
    mrbs/branches/provisional_bookings/web/month.php

Modified: mrbs/branches/provisional_bookings/web/functions.inc
===================================================================
--- mrbs/branches/provisional_bookings/web/functions.inc        2009-12-09 
20:50:55 UTC (rev 1279)
+++ mrbs/branches/provisional_bookings/web/functions.inc        2009-12-09 
21:02:28 UTC (rev 1280)
@@ -1074,6 +1074,7 @@
   global $main_cell_height, $main_table_cell_border_width;
   global $area, $year, $month, $timetohighlight;
   global $javascript_cursor, $enable_periods, $times_along_top;
+  global $provisional_enabled;
   
   // if the time slot has got multiple bookings, then draw a mini-table
   if(isset($cell[1]["id"]))
@@ -1119,7 +1120,7 @@
       $descr      = htmlspecialchars($cell[$n]["data"]);
       $long_descr = htmlspecialchars($cell[$n]["long_descr"]);
       $class = $color;
-      if ($status == STATUS_PROVISIONAL)
+      if ($provisional_enabled && ($status == STATUS_PROVISIONAL))
       {
         $class .= " provisional";
       }
@@ -1165,7 +1166,7 @@
       $descr      = htmlspecialchars($cell[$n]["start_time"] . " " . 
$cell[$n]["data"]);
       $long_descr = htmlspecialchars($cell[$n]["long_descr"]);
       $class = $color;
-      if ($status == STATUS_PROVISIONAL)
+      if ($provisional_enabled && ($status == STATUS_PROVISIONAL))
       {
         $class .= " provisional";
       }    
@@ -1217,7 +1218,7 @@
     if (isset($id))
     {
       $c = $color;
-      if ($status == STATUS_PROVISIONAL)
+      if ($provisional_enabled && ($status == STATUS_PROVISIONAL))
       {
         $c .= " provisional";
       } 

Modified: mrbs/branches/provisional_bookings/web/month.php
===================================================================
--- mrbs/branches/provisional_bookings/web/month.php    2009-12-09 20:50:55 UTC 
(rev 1279)
+++ mrbs/branches/provisional_bookings/web/month.php    2009-12-09 21:02:28 UTC 
(rev 1280)
@@ -579,7 +579,7 @@
         // give the enclosing div the appropriate width: full width if both,
         // otherwise half-width (but use 49.9% to avoid rounding problems in 
some browsers)
         $class = $d[$cday]["color"][$i];
-        if ($d[$cday]["status"][$i] == STATUS_PROVISIONAL)
+        if ($provisional_enabled && ($d[$cday]["status"][$i] == 
STATUS_PROVISIONAL))
         {
           $class .= " provisional";
         }   


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

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to