Browse Source

added Ruebots patch for filehash 3

main
Paul Pound 2 weeks ago
parent
commit
9836b2de3d
  1. 2
      composer.json
  2. 2
      src/FixityCheckService.php

2
composer.json

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

2
src/FixityCheckService.php

@ -218,7 +218,7 @@ class FixityCheckService implements FixityCheckServiceInterface {
// Assume success until proven untrue.
$state = FixityCheck::STATE_MATCHES;
// 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.
if (!isset($file->{$column})) {
$state = FixityCheck::STATE_NO_CHECKSUM;

Loading…
Cancel
Save