function hacked_hash_project in Hacked! 5
Same name and namespace in other branches
- 6 hacked.module \hacked_hash_project()
2 calls to hacked_hash_project()
File
- ./
hacked.module, line 260 - 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'])) {
$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;
}
}
}