You are here

function hackedProject::hash_local_project in Hacked! 7.2

Same name and namespace in other branches
  1. 6.2 includes/hacked_project.inc \hackedProject::hash_local_project()

Hash the local version of the project.

3 calls to hackedProject::hash_local_project()
hackedProject::compute_differences in includes/hackedProject.inc
Compute the differences between our version and the canonical version of the project.
hackedProject::file_get_location in includes/hackedProject.inc
hackedProject::file_is_diffable in includes/hackedProject.inc

File

includes/hackedProject.inc, line 223

Class

hackedProject
Encapsulates a Hacked! project.

Code

function hash_local_project() {

  // Only do this once, no matter how many times we're called.
  if (!empty($this->local_hashed)) {
    return;
  }
  $location = $this
    ->locate_local_project();
  $this->local_files = hackedFileGroup::fromList($location, $this->remote_files->files);
  $this->local_files
    ->compute_hashes();
  $this->local_hashed = !empty($this->local_files->files);

  // Logging.
  if (!$this->local_hashed) {
    watchdog('hacked', 'Could not hash local project: @title', array(
      '@title' => $this
        ->title(),
    ), WATCHDOG_ERROR);
  }
}