function taxonomy_edge_system_settings_form_submit_custom in Taxonomy Edge 7
Submit handler for rebuild menu after saving.
Changing the override term pages setting requires rebuild of menu. Since we have no proper atomic way of detecting whether or not the setting has actually changed (theoretical race-condition), we always rebuild when saving these settings.
1 string reference to 'taxonomy_edge_system_settings_form_submit_custom'
- taxonomy_edge_settings_form in ./
taxonomy_edge.admin.inc - Form build for the settings form.
File
- ./
taxonomy_edge.admin.inc, line 75 - Pages for taxonomy edge settings and more.
Code
function taxonomy_edge_system_settings_form_submit_custom($form, &$form_state) {
// If a rebuild is already in progress, chances are that our new settings
// is not part of the rebuild. We therefore wait for the rebuild to finish
// and then rebuild again.
if (!lock_acquire('menu_rebuild')) {
lock_wait('menu_rebuild');
if (!lock_acquire('menu_rebuild')) {
drupal_set_message(t("Could not rebuild menu. Please rebuild menu / clear cache to make the term pages override take effect."), 'error');
return;
}
}
menu_rebuild();
}