function _acquia_search_set_version in Acquia Search 6.3
Same name and namespace in other branches
- 2.x acquia_search.install \_acquia_search_set_version()
Helper function to cache the Acquia Search version.
3 calls to _acquia_search_set_version()
- acquia_search_acquia_subscription_status in ./
acquia_search.module - Implementation of hook_acquia_subscription_status().
- acquia_search_enable in ./
acquia_search.module - Implementation of hook_enable().
- acquia_search_requirements in ./
acquia_search.install - Implementation of hook_requirements().
File
- ./
acquia_search.module, line 156 - Integration between Acquia Drupal and Acquia's hosted solr search service.
Code
function _acquia_search_set_version() {
// Cache the version in a variable so we can send it at no extra cost.
$version = variable_get('acquia_search_version', '6.x-3.x');
$path = drupal_get_path('module', 'acquia_search') . '/acquia_search.info';
$info = drupal_parse_info_file($path);
// Send the version, or at least the core compatibility as a fallback.
$new_version = isset($info['version']) ? (string) $info['version'] : '6.x-3.x';
if ($version != $new_version) {
variable_set('acquia_search_version', $new_version);
}
}