You are here

function webform_validation_check_version in Webform Validation 6

Check if we are operating with Webforms 6.x-2.x or 6.x-3.x

4 calls to webform_validation_check_version()
webform_validation_get_vars in ./webform_validation.module
Get variables based on the installed version of Webform module
webform_validation_valid_component_types in ./webform_validation.validators.inc
Get a list of valid component types per validator, as defined via hook_webform_validation_validators(). If 'all' is specified, all available component types will be returned.
webform_validation_webform_validation_validate in ./webform_validation.validators.inc
Implementation of hook_webform_validation_validate().
_webform_validation_get_group_types in ./webform_validation.module
Get all webform components that are defined as a group

File

./webform_validation.module, line 280

Code

function webform_validation_check_version() {
  static $version;
  if (!$version) {
    $webform_info = unserialize(db_result(db_query("SELECT info FROM {system} WHERE name = 'webform'")));
    if (substr($webform_info['version'], 0, 5) == '6.x-2') {
      $version = 2;
    }
    else {
      $version = 3;
    }
  }
  return $version;
}