change check for db query
This commit is contained in:
@@ -111,16 +111,16 @@ function travel_form($node, &$form_state, $db_node = NULL, $inserting = FALSE, $
|
|||||||
//there's already info in $node so use that
|
//there's already info in $node so use that
|
||||||
if (!empty($db_node)) {
|
if (!empty($db_node)) {
|
||||||
$data = $db_node;
|
$data = $db_node;
|
||||||
watchdog('booking_debug', "<pre>Travel form not-empty node:\n@info</pre>", array('@info' => print_r( $data, true)));
|
watchdog('booking_debug', "<pre>Travel form loaded from travel page:\n@info</pre>", array('@info' => print_r( $data, true)));
|
||||||
}
|
}
|
||||||
//otherwise rely on the form state from the previous submission
|
//otherwise rely on the form state from the previous submission
|
||||||
else {
|
else {
|
||||||
$data = $form_state['node'];
|
$data = $form_state['node'];
|
||||||
watchdog('booking_debug', "<pre>Travel form empty node:\n@info</pre>", array('@info' => print_r( $data, true)));
|
watchdog('booking_debug', "<pre>Travel form loaded directly:\n@info</pre>", array('@info' => print_r( $data, true)));
|
||||||
}
|
}
|
||||||
|
|
||||||
//get info from the database if we don't have it
|
//get info from the database if we don't have it
|
||||||
if (! $data->booking_dietary) {
|
if (! $data->booking_partner_id) {
|
||||||
watchdog('booking_debug', "<pre>Travel form querying database for missing details</pre>");
|
watchdog('booking_debug', "<pre>Travel form querying database for missing details</pre>");
|
||||||
|
|
||||||
$person = db_query("SELECT booking_dietary, booking_medical_conditions, booking_bf_gf_nid, booking_partner_id, booking_room_mate1 " .
|
$person = db_query("SELECT booking_dietary, booking_medical_conditions, booking_bf_gf_nid, booking_partner_id, booking_room_mate1 " .
|
||||||
|
Reference in New Issue
Block a user