function themekey_ui_pathalias_submit in ThemeKey 7.3
Same name and namespace in other branches
- 6.4 themekey_ui_admin.inc \themekey_ui_pathalias_submit()
- 6.2 themekey_ui_admin.inc \themekey_ui_pathalias_submit()
- 6.3 themekey_ui_admin.inc \themekey_ui_pathalias_submit()
- 7 themekey_ui_admin.inc \themekey_ui_pathalias_submit()
- 7.2 themekey_ui_admin.inc \themekey_ui_pathalias_submit()
Form submission handler for themekey_ui_pathalias().
See also
1 string reference to 'themekey_ui_pathalias_submit'
- themekey_ui_pathalias in ./
themekey_ui_admin.inc - Adds theme select box to url alias form
File
- ./
themekey_ui_admin.inc, line 321
Code
function themekey_ui_pathalias_submit($form, &$form_state) {
if ((empty($form_state['values']['themekey_ui_theme']) || 'default' == $form_state['values']['themekey_ui_theme']) && $form_state['values']['themekey_rule_id']) {
themekey_ui_del_path_theme($form_state['values']['themekey_rule_id']);
}
elseif (!empty($form_state['values']['themekey_ui_theme']) && 'default' != $form_state['values']['themekey_ui_theme']) {
themekey_ui_set_path_theme($form_state['values']['alias'], $form_state['values']['themekey_ui_theme'], $form_state['values']['themekey_rule_id']);
}
if ($form['source']['#default_value'] == $form_state['values']['source'] && $form['alias']['#default_value'] == $form_state['values']['alias'] && $form['themekey_ui_themes']['themekey_ui_theme']['#default_value'] != $form_state['values']['themekey_ui_theme']) {
// only theme changed => clear page cache
// REVIEW this might be a performance issue on large sites
cache_clear_all('%' . $form_state['values']['alias'], 'cache_page', TRUE);
}
}