call _booking_node_create_mysqlview when setting values via admin page

This commit is contained in:
2016-05-27 17:30:04 +10:00
parent 7336f4d351
commit 368d5d6555
2 changed files with 7 additions and 1 deletions

View File

@@ -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)

View File

@@ -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