function _cdn_requirements_is_patched_distribution in CDN 6.2
Checks if the used Drupal distribution is already patched or not. (This is the case when either Pressflow or Cocomore is being used).
3 calls to _cdn_requirements_is_patched_distribution()
- cdn_requirements in ./
cdn.install - Implementation of hook_requirements().
- _cdn_requirements_detect_fallback in ./
cdn.requirements.inc - Detect whether the fallback mechanism (to alter file URLs, the best mechanism is the core patch, but a fallback to the theme layer is included) should be enabled or disabled, and actually enable/disable it, too.
- _cdn_requirements_get_integration_mechanism in ./
cdn.requirements.inc - Get the integration mechanism that is currently being used by the CDN integration module.
File
- ./
cdn.requirements.inc, line 139 - Functionality to automatically detect if a patch has been applied.
Code
function _cdn_requirements_is_patched_distribution() {
$profile = realpath('.') . '/profiles/default/default.profile';
if (!file_exists($profile)) {
return FALSE;
}
include_once $profile;
$default = default_profile_details();
if ($default['name'] == 'Pressflow') {
return 'pressflow';
}
if (stristr($default['name'], 'cocomore')) {
return 'cocomore';
}
return FALSE;
}