MRBS Help! Thanks!
We are using 1.4.1 and I am having some issues. I want to limit bookings to 45 minutes, no more.
I took this code from online:
# if not administrator, reject bookings longer than 2 hours
if ((!getAuthorised(2)) && (($units * $duration) > 7200))
print_header($day, $month, $year, $area);
<H1><?php echo get_vocab('invalid_booking'); ?></H1>
<?php echo get_vocab('invalid_duration'); ?>
and put it in the edit_entry_handler.php and it is not working. I have looked through all the code and one of the problems is that I have to do this through VIM. It's not the easiest to read or search! haha
Any help would be appreciated. Thanks,
Is it possible for you to update to the latest version? 1.4.1 is 2 years old. There is an option in 1.4.7 for this:
// Set a maximum duration for bookings
$max_duration_enabled = FALSE; // Set to TRUE if you want to enforce a maximum duration
$max_duration_secs = 60*60*2; // (seconds) - when using "times"
$max_duration_periods = 2; // (periods) - when using "periods"
There are also other improvments as well.
If you don't have any customisations, the upgrade is usually fairly painless as long as you have a working backup.
Is the upgrade seamless? And what do I need to do for the upgrade? Our programmer in IT left so I took over this but I am not familiar with MRBS.
We have it working with our LDAP and I am wondering if the upgrade will mess that all up?
As Chris said, it's fairly painless unless you have custom code. I have completely redesigned our MRBS to the extent it is unrecognisable (see here), though if it's just using a vanilla setup, it's normally just a case of overwriting the MRBS files (afaik, there is no upgrade routine via GUI or cmd).
Just make sure you don't overwrite your current config.inc.php as you'll need that for reference when reconfiguring the settings (but rename the old one).
You could, if you're feeling nervous, is copy the files for the new version to a different folder/location but still reference the same database and have 2 versions of MRBS working with the same database. That is what I did whilst I developed the newer version to suit our needs, and staff continued to use the old version, then I simply renamed the folder where the new version was and it was fine!
Not sure about LDAP, as I use an independant database for MRBS (for 2 reasons - had issues with LDAP and cba looking into it)!