function _hosting_version_info_extract in Hosting 5
1 call to _hosting_version_info_extract()
File
- package/
hosting_package.instance.inc, line 184 - API for mapping packages to various Hosting node types
Code
function _hosting_version_info_extract(&$instance) {
$parts = explode('-', $instance->version);
switch (sizeof($parts)) {
case '3':
$instance->project_version = str_replace(".x", ".0", $parts[1]) . "." . $parts[2];
$instance->drupal_version = str_replace(".x", ".0", $parts[0]);
break;
case '2':
$instance->project_version = str_replace(".x", ".0", $parts[1]);
$instance->drupal_version = str_replace(".x", ".0", $parts[0]);
break;
case '1':
$instance->drupal_version = str_replace(".x", ".0", $parts[0]);
break;
}
}