express_version.module in Express 7.2
Version.
File
modules/custom/express_version/express_version.moduleView source
<?php
/**
* @file
* Version.
*/
/**
* Combines the version of core and profile.
*/
function express_version_get_version() {
$core_version = _express_version_determine_core_version();
$core_parts = explode('-', $core_version);
$profile_version = _express_version_determine_core_version();
$profile_version_parts = explode('.', $profile_version);
return $core_parts[1] . '.' . $profile_version_parts[2];
}
/**
* Determines the version of Drupal core in use.
*/
function _express_version_determine_core_version() {
// use core variable
$parse = drupal_parse_info_file(drupal_get_path('module', 'cu_core') . '/cu_core.info');
return $parse['version'];
}
/**
* Determines the installed profile and its version.
*/
function _express_version_determine_profile_version() {
require_once DRUPAL_ROOT . '/includes/install.inc';
// Determine installation profile used.
$profile = variable_get('install_profile', '');
$parse = install_profile_info($profile);
return $parse['version'];
}
Functions
Name | Description |
---|---|
express_version_get_version | Combines the version of core and profile. |
_express_version_determine_core_version | Determines the version of Drupal core in use. |
_express_version_determine_profile_version | Determines the installed profile and its version. |