Browse Source

Update to use filehash 3.x.

- Resolves #21
pull/22/head
nruest 8 months ago
parent
commit
903af28bc3
No known key found for this signature in database
GPG Key ID: 417FAF1A0E1080CD
  1. 2
      composer.json
  2. 2
      src/FixityCheckService.php

2
composer.json

@ -3,6 +3,6 @@
"type": "drupal-module", "type": "drupal-module",
"license": "GPL-2.0-or-later", "license": "GPL-2.0-or-later",
"require": { "require": {
"drupal/filehash": "^2.0" "drupal/filehash": "^3.0"
} }
} }

2
src/FixityCheckService.php

@ -223,7 +223,7 @@ class FixityCheckService implements FixityCheckServiceInterface {
// Assume success until proven untrue. // Assume success until proven untrue.
$state = FixityCheck::STATE_MATCHES; $state = FixityCheck::STATE_MATCHES;
// If column is set, only generate that hash. // If column is set, only generate that hash.
foreach ($this->filehash->algos() as $column => $algo) { foreach ($this->filehash->getEnabledAlgorithms() as $column => $algo) {
// Nothing to do if the previous checksum value is not known. // Nothing to do if the previous checksum value is not known.
if (!isset($file->{$column})) { if (!isset($file->{$column})) {
$state = FixityCheck::STATE_NO_CHECKSUM; $state = FixityCheck::STATE_NO_CHECKSUM;

Loading…
Cancel
Save