function google_appliance_block_save in Google Search Appliance 6.2
Same name and namespace in other branches
- 5 google_appliance.module \google_appliance_block_save()
Save settings for stand-alone search block.
1 string reference to 'google_appliance_block_save'
- google_appliance_form_alter in ./
google_appliance.module - Implementation of hook_form_alter().
File
- ./
google_appliance.module, line 1403 - Google Search Appliance (GSA) / Google Mini integration
Code
function google_appliance_block_save($form, $form_state) {
$var_name = $form_state['values']['module'] . '-' . $form_state['values']['delta'];
$block_settings = variable_get('google_appliance_block_settings', array());
if (!isset($form_state['values']['google_appliance']['hide'])) {
unset($block_settings[$var_name]);
}
else {
$block_settings[$var_name] = $form_state['values']['google_appliance']['hide'];
}
variable_set('google_appliance_block_settings', $block_settings);
}