Loading core/modules/locale/src/LocaleSource.php +4 −11 Original line number Diff line number Diff line Loading @@ -107,19 +107,12 @@ public function buildSources(array $projects, array $langcodes = []): array { public function sourceCheckFile($source) { if (isset($source->files[LOCALE_TRANSLATION_LOCAL])) { $source_file = $source->files[LOCALE_TRANSLATION_LOCAL]; $directory = $source_file->directory; $filename = '/' . preg_quote($source_file->filename) . '$/'; if (is_dir($directory)) { if ($files = $this->fileSystem->scanDirectory($directory, $filename, ['key' => 'name', 'recurse' => FALSE])) { $file = current($files); $source_file->uri = $file->uri; $source_file->timestamp = filemtime($file->uri); $source_file->hash = hash_file(self::LOCAL_FILE_HASH_ALGO, $file->uri); if (isset($source_file->uri) && file_exists($source_file->uri)) { $source_file->timestamp = filemtime($source_file->uri); $source_file->hash = hash_file(self::LOCAL_FILE_HASH_ALGO, $source_file->uri); return $source_file; } } } return FALSE; } Loading Loading
core/modules/locale/src/LocaleSource.php +4 −11 Original line number Diff line number Diff line Loading @@ -107,19 +107,12 @@ public function buildSources(array $projects, array $langcodes = []): array { public function sourceCheckFile($source) { if (isset($source->files[LOCALE_TRANSLATION_LOCAL])) { $source_file = $source->files[LOCALE_TRANSLATION_LOCAL]; $directory = $source_file->directory; $filename = '/' . preg_quote($source_file->filename) . '$/'; if (is_dir($directory)) { if ($files = $this->fileSystem->scanDirectory($directory, $filename, ['key' => 'name', 'recurse' => FALSE])) { $file = current($files); $source_file->uri = $file->uri; $source_file->timestamp = filemtime($file->uri); $source_file->hash = hash_file(self::LOCAL_FILE_HASH_ALGO, $file->uri); if (isset($source_file->uri) && file_exists($source_file->uri)) { $source_file->timestamp = filemtime($source_file->uri); $source_file->hash = hash_file(self::LOCAL_FILE_HASH_ALGO, $source_file->uri); return $source_file; } } } return FALSE; } Loading