/** * Calculate hashes for current version * * @return array */ protected function loadHashesForInstalledFiles() { $result = array(); $module = $this->getModuleInstalled(); if ($module) { $pack = new \XLite\Core\Pack\Module($module); foreach ($pack->getDirectoryIterator() as $file) { if ($file->isFile()) { $relativePath = \Includes\Utils\FileManager::getRelativePath($file->getPathname(), LC_DIR_ROOT); if ($relativePath) { $result[$relativePath] = \Includes\Utils\FileManager::getHash($file->getPathname(), true); } } } } return $result ?: $this->getHashes(true); }