Booked Scheduler Community Support
December 13, 2017, 08:56:38 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Booked 2.5 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: 2.5 to 2.6 gotcha: CalendarTypes constants name changed inconsistently  (Read 133 times)
vuw-ecs-kevin
Newbie
*

Karma: 0
Posts: 3


« on: November 09, 2017, 10:11:23 PM »

Our website has some links to various views of our Booked
installation, some of which included the query string parameter

&ct=day

When testing out the 2.6 series, we found that these links
no longer rendered the calendar section of the page.

After much head scratching, we found the culprit in

lib/Application/Schedule/CalendarFactory.php

where only two of the three constants from 2.5's

class CalendarTypes
{
    const Month = 'month';
    const Week = 'week';
    const Day = 'day';
}

have been capitalised and had an extra "agenda" prepended

class CalendarTypes
{
    const Month = 'month';
    const Week = 'agendaWeek';
    const Day = 'agendaDay';
}

which meant that whilst

&ct=day 
  or 
&ct=week

failed,

&ct=month

still worked, which just added to to he head scratching.

Persumably there's a reason for the inconsistent change but am
flagging this up in case it helps someone else's head get less of
a scratching.

Kevin Buckley
School of Engineering and Computer Science
Victoria University of Wellington
New Zealand
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!