Revision 93115722
Added by Andreas Kohlbecker over 7 years ago
modules/cdm_dataportal/settings.php | ||
---|---|---|
1864 | 1864 |
'#type' => 'fieldset', |
1865 | 1865 |
'#collapsible' => false, |
1866 | 1866 |
'#tree' => true, |
1867 |
'#description' => 'Setting a label for a tab will override the default label.' |
|
1867 |
'#description' => 'Setting a label for a tab will override the default label. |
|
1868 |
Please enter the label text in the default language of the portal.' |
|
1868 | 1869 |
); |
1869 | 1870 |
foreach (get_taxon_tabs_list() as $label) { |
1870 | 1871 |
$key = strtolower($label); // turn in to string, since we need to use strings as keys |
... | ... | |
3245 | 3246 |
file_usage_add($file, 'cdm_dataportal', CDM_TAXON_PROFILE_IMAGE, 0); |
3246 | 3247 |
} |
3247 | 3248 |
} |
3248 |
// rebuild the menu if the show tabs setting has changed, otherwise the change will not have a consistent effect |
|
3249 |
if(variable_get('cdm_dataportal_taxonpage_tabs', 1) != $form_state['values']['cdm_dataportal_taxonpage_tabs']){ |
|
3249 |
// rebuild the menu if the specific tabs setting have changed, otherwise the change will not have a consistent effect |
|
3250 |
$tab_lables_modified = serialize(get_array_variable_merged(CDM_TAXONPAGE_TAB_LABELS, CDM_TAXONPAGE_TAB_LABELS_DEFAULT)) != serialize($form_state['values'][CDM_TAXONPAGE_TAB_LABELS]); |
|
3251 |
$tabs_enabled_modified = variable_get('cdm_dataportal_taxonpage_tabs', 1) != $form_state['values']['cdm_dataportal_taxonpage_tabs']; |
|
3252 |
if($tab_lables_modified || $tabs_enabled_modified){ |
|
3250 | 3253 |
// we first need to set the variable to persist the changes setting |
3251 | 3254 |
variable_set('cdm_dataportal_taxonpage_tabs', $form_state['values']['cdm_dataportal_taxonpage_tabs']); |
3255 |
variable_set(CDM_TAXONPAGE_TAB_LABELS, $form_state['values'][CDM_TAXONPAGE_TAB_LABELS]); |
|
3252 | 3256 |
menu_rebuild(); |
3253 | 3257 |
} |
3254 | 3258 |
} |
Also available in: Unified diff
ref #4490 automatic menu cache refresh after tab label changes