Revision: 2671
https://sourceforge.net/p/mrbs/code/2671/
Author: cimorrison
Date: 2013-02-01 19:10:24 +0000 (Fri, 01 Feb 2013)
Log Message:
-----------
Fixed bug where no room was selected on changing area. See SF bugs #259
Modified Paths:
--------------
mrbs/trunk/web/edit_entry.php
mrbs/trunk/web/edit_entry_handler.php
Modified: mrbs/trunk/web/edit_entry.php
===================================================================
--- mrbs/trunk/web/edit_entry.php 2013-02-01 18:20:25 UTC (rev 2670)
+++ mrbs/trunk/web/edit_entry.php 2013-02-01 19:10:24 UTC (rev 2671)
@@ -425,8 +425,10 @@
$attributes[] = 'data-max_duration_units="' .
htmlspecialchars($areas[$a]['max_duration_units']) . '"';
$attributes[] = 'data-timezone="' .
htmlspecialchars($areas[$a]['timezone']) . '"';
+ $room_ids = array_keys($rooms);
$params['id'] = 'rooms' . $a;
$params['options'] = $rooms;
+ $params['value'] = $room_ids[0];
$params['attributes'] = $attributes;
generate_select($params);
}
Modified: mrbs/trunk/web/edit_entry_handler.php
===================================================================
--- mrbs/trunk/web/edit_entry_handler.php 2013-02-01 18:20:25 UTC (rev
2670)
+++ mrbs/trunk/web/edit_entry_handler.php 2013-02-01 19:10:24 UTC (rev
2671)
@@ -208,9 +208,14 @@
unset($id);
}
-// Make sure the area corresponds to the room that is being booked
-if (!empty($rooms[0]))
+
+if (empty($rooms))
{
+ trigger_error('Internal error: no rooms specified', E_USER_WARNING);
+}
+else
+{
+ // Make sure the area corresponds to the room that is being booked
$area = get_area($rooms[0]);
get_area_settings($area); // Update the area settings
}
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits