function hacked_hash_project in Hacked! 6
Same name and namespace in other branches
- 5 hacked.module \hacked_hash_project()
2 calls to hacked_hash_project()
File
- ./
hacked.module, line 249 - The Hacked! module, shows which project have been changed since download.
Code
function hacked_hash_project($project, $ensure_downloaded = FALSE) {
if ($project['project_type'] == 'module' || $project['project_type'] == 'theme' || $project['project_type'] == 'core') {
if (isset($project['existing_version']) && isset($project['releases'][$project['existing_version']])) {
$this_release = $project['releases'][$project['existing_version']];
// Can we get this from the cache?
if ($ensure_downloaded || !hacked_project_hashes_are_cached($project['project_type'], $project['short_name'], $project['existing_version'])) {
// We check to see if cvs deploy's sticky fingers have been in this project
if (isset($project['info']['_hacked_is_cvs_checkout']) && $project['info']['_hacked_is_cvs_checkout']) {
// Download this using CVS:
$dir = hacked_cvs_checkout_release($project['project_type'], $project['short_name'], $project['existing_version'], $project['info']['_hacked_info_filename']);
}
else {
$dir = hacked_download_release($this_release['download_link'], $project['project_type'], $project['short_name'], $project['existing_version']);
}
}
$hashed = hacked_release_generate_hashes_cached($project['project_type'], $project['short_name'], $project['existing_version']);
return $hashed;
}
}
}