function hackedProject::hash_remote_project in Hacked! 7.2
Same name and namespace in other branches
- 6.2 includes/hacked_project.inc \hackedProject::hash_remote_project()
Hashes the remote project downloaded earlier.
3 calls to hackedProject::hash_remote_project()
- hackedProject::compute_differences in includes/
hackedProject.inc - Compute the differences between our version and the canonical version of the project.
- hackedProject::file_is_diffable in includes/
hackedProject.inc - hackedProject::locate_local_project in includes/
hackedProject.inc - Locate the base directory of the local project.
File
- includes/
hackedProject.inc, line 154
Class
- hackedProject
- Encapsulates a Hacked! project.
Code
function hash_remote_project() {
// Only do this once, no matter how many times we're called.
if (!empty($this->remote_hashed)) {
return;
}
// Ensure that the remote project has actually been downloaded.
$this
->download_remote_project();
// Set up the remote file group.
$base_path = $this->remote_files_downloader
->get_final_destination();
$this->remote_files = hackedFileGroup::fromDirectory($base_path);
$this->remote_files
->compute_hashes();
$this->remote_hashed = !empty($this->remote_files->files);
// Logging.
if (!$this->remote_hashed) {
watchdog('hacked', 'Could not hash remote project: @title', array(
'@title' => $this
->title(),
), WATCHDOG_ERROR);
}
}