Changeset:
        90b350b0b3b9
        
https://sourceforge.net/p/mrbs/hg-code/ci/90b350b0b3b97241edbb76f122ee9082a2a2e4b7
Author:
        Campbell Morrison <[email protected]>
Date:
        Wed Jul 06 18:38:22 2016 +0100
Log message:

Modified show_colour_key() so that the colour key is not shown if there are 
fewer than two types.  (See SF Support Requests #1019)

diffstat:

 web/functions.inc |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (18 lines):

diff -r 15ed7818167c -r 90b350b0b3b9 web/functions.inc
--- a/web/functions.inc Sun May 29 14:22:00 2016 +0100
+++ b/web/functions.inc Wed Jul 06 18:38:22 2016 +0100
@@ -2064,6 +2064,14 @@
 function show_colour_key()
 {
   global $booking_types;
+  
+  // No point in showing the colour key if we aren't using entry types.  
(Note:  count()
+  // returns 0 if its parameter is not set).
+  if (count($booking_types) < 2)
+  {
+    return;
+  }
+  
   // set the table width.   Default is 5, but try and avoid rows of unequal 
length
   switch (count($booking_types))
   {

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to