You are here

function clientside_validation_update_7103 in Clientside Validation 7

Same name and namespace in other branches
  1. 7.2 clientside_validation.install \clientside_validation_update_7103()

Add captcha setting.

File

./clientside_validation.install, line 321

Code

function clientside_validation_update_7103() {
  $default_settings_db = variable_get('clientside_validation_default_settings', FALSE);
  if (!$default_settings_db) {

    // Default settings are not stored in the database.
    // Nothing to do here.
    return;
  }
  module_load_include('module', 'clientside_validation', 'clientside_validation');
  $default_settings = clientside_validation_settings_load_defaults();
  if (!isset($default_settings['validate_options']['captcha'])) {
    $default_settings['validate_options']['captcha'] = 1;
  }
  variable_set('clientside_validation_default_settings', $default_settings);
}