Remove usage of deprecated function _booking_room_location_lookup

This commit is contained in:
2016-05-04 11:00:47 +10:00
parent 3c64131ea4
commit fc4b847368

View File

@@ -642,14 +642,20 @@ function booking_csv_report() {
$datetime_fields = array('booking_outflight_origin_ts', 'booking_outflight_destination_ts', 'booking_rtrnflight_origin_ts',
'booking_rtrnflight_destination_ts', 'booking_timestamp', 'booking_flight_datetime_inbound', 'booking_flight_datetime_outbound');
$number_only_fields = array('booking_postcode', 'booking_mobile', 'booking_phone');
//look up room location descriptions for presenting a friendly name rather than an ID
$room_locations = array();
$room_query = db_query("SELECT * FROM {booking_room_locations} WHERE booking_roomlocation_active = 'Y'");
$room_locations = $room_query->fetchAllAssoc('lid');
//look up the titles of the study groups and add to array for updating in the header
$studygroup_descriptions = array();
$studygroups_query = db_query("SELECT * FROM {booking_studygroup_list} WHERE booking_eventid = :eid",
array(':eid' => $event->eid));
$studygroups = $studygroups_query->fetchAllAssoc('sid');
foreach ($studygroups as $studygroup)
{
//update array for turning study group session IDs into the name for that group
foreach ($studygroups as $studygroup) {
//calculate the session references
$sessionid = "session" . $studygroup->sid;
$roleid = $sessionid . "_role";
@@ -658,8 +664,7 @@ function booking_csv_report() {
$studygroup_descriptions[$sessionid] = $description;
$studygroup_descriptions[$roleid] = $description . " Role";
if ($studygroup->booking_is_readinggroup == 'Y')
{
if ($studygroup->booking_is_readinggroup == 'Y') {
$readinggroup_id = $sessionid;
}
}
@@ -759,7 +764,8 @@ function booking_csv_report() {
//room location
if ($key == 'booking_room_location_id') {
$output[] = _booking_room_location_lookup($value);
//$output[] = _booking_room_location_lookup($value);
$output[] = $room_locations[$value];
continue;
}