call _booking_node_create_mysqlview when setting values via admin page
This commit is contained in:
@@ -533,7 +533,12 @@ function booking_admin()
|
|||||||
'#default_value' => variable_get('booking_import_include_fields_dynamic', ''),
|
'#default_value' => variable_get('booking_import_include_fields_dynamic', ''),
|
||||||
);
|
);
|
||||||
|
|
||||||
return system_settings_form($form);
|
//return system_settings_form($form);
|
||||||
|
//make sure we update our custom sql view every time we change something on the admin page
|
||||||
|
$form = system_settings_form($form);
|
||||||
|
$form['#submit'][] = '_booking_node_create_mysqlview';
|
||||||
|
return $form;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function booking_admin_validate($form, $form_state)
|
function booking_admin_validate($form, $form_state)
|
||||||
|
@@ -51,6 +51,7 @@ function _booking_node_create_mysqlview()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//filter the results either by current active event
|
//filter the results either by current active event
|
||||||
|
// @todo is this filter really necessary?
|
||||||
$query->condition('p.booking_eventid', $event->eid, '=');
|
$query->condition('p.booking_eventid', $event->eid, '=');
|
||||||
|
|
||||||
//add the database fields we always want to retrieve
|
//add the database fields we always want to retrieve
|
||||||
|
Reference in New Issue
Block a user