| 1 |
<?php |
<?php |
| 2 |
// $Id: livesearch.module,v 1.15 2007/05/08 04:46:19 kourge Exp $ |
// $Id: livesearch.module,v 1.16 2007/05/08 06:19:14 kourge Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_menu(). |
* Implementation of hook_menu(). |
| 185 |
if (!ctype_digit($form_values['delay_duration'])) { |
if (!ctype_digit($form_values['delay_duration'])) { |
| 186 |
form_set_error('delay_duration', t('The firing delay duration must be a number that is an integer.')); |
form_set_error('delay_duration', t('The firing delay duration must be a number that is an integer.')); |
| 187 |
} |
} |
|
switch ($form_values['op']) { |
|
|
case t('Reset to defaults'): |
|
|
variable_del('target_search_box'); |
|
|
variable_del('compact_search_box'); |
|
|
variable_del('delay_duration'); |
|
|
variable_del('search_results_location'); |
|
|
variable_del('hide_snippets'); |
|
|
variable_del('show_item_info'); |
|
|
variable_del('scroll_to_search_result'); |
|
|
break; |
|
|
case t('Save configuration'): |
|
|
variable_set('target_search_box', (string)$form_values['target_search_box']); |
|
|
variable_set('compact_search_box', (bool)$form_values['compact_search_box']); |
|
|
variable_set('delay_duration', (int)$form_values['delay_duration']); |
|
|
variable_set('search_results_location', (string)$form_values['search_results_location']); |
|
|
variable_set('hide_snippets', (bool)$form_values['hide_snippets']); |
|
|
variable_set('show_item_info', (bool)$form_values['show_item_info']); |
|
|
variable_set('scroll_to_search_result', (bool)$form_values['scroll_to_search_result']); |
|
|
break; |
|
|
} |
|
| 188 |
} |
} |