Browse Source

D10 support.

pull/10/head
Adam Vessey 1 year ago
parent
commit
754503259c
No known key found for this signature in database
GPG Key ID: 89B39535BF6D0D39
  1. 2
      README.md
  2. 2
      dgi_fixity.info.yml
  3. 1
      src/Controller/FixityCheckController.php
  4. 4
      src/FixityCheckService.php

2
README.md

@ -111,5 +111,5 @@ and or contact [discoverygarden].
[discoverygarden]: http://support.discoverygarden.ca [discoverygarden]: http://support.discoverygarden.ca
[filehash]: https://www.drupal.org/project/filehash [filehash]: https://www.drupal.org/project/filehash
[gplv2]: http://www.gnu.org/licenses/gpl-2.0.txt [gplv2]: http://www.gnu.org/licenses/gpl-2.0.txt
[install]: https://drupal.org/documentation/install/modules-themes/modules-8 [install]: https://www.drupal.org/docs/extending-drupal/installing-modules
[CTDA: Connecticut Digital Archive]: https://lib.uconn.edu/find/connecticut-digital-archive/ [CTDA: Connecticut Digital Archive]: https://lib.uconn.edu/find/connecticut-digital-archive/

2
dgi_fixity.info.yml

@ -2,7 +2,7 @@ name: 'Fixity'
description: "Performs fixity checks on files." description: "Performs fixity checks on files."
type: module type: module
package: DGI package: DGI
core_version_requirement: ^8 || ^9 core_version_requirement: ^9 || ^10
configure: dgi_fixity.settings configure: dgi_fixity.settings
dependencies: dependencies:
- drupal:file - drupal:file

1
src/Controller/FixityCheckController.php

@ -235,6 +235,7 @@ class FixityCheckController extends ControllerBase {
->condition('id', $fixity_check->id()) ->condition('id', $fixity_check->id())
->sort('performed', 'DESC') ->sort('performed', 'DESC')
->pager(50) ->pager(50)
->accessCheck()
->execute(); ->execute();
return array_keys($result); return array_keys($result);
} }

4
src/FixityCheckService.php

@ -293,6 +293,7 @@ class FixityCheckService implements FixityCheckServiceInterface {
->condition('performed', 0, '!=') ->condition('performed', 0, '!=')
->groupBy('state') ->groupBy('state')
->aggregate('id', 'COUNT') ->aggregate('id', 'COUNT')
->accessCheck(FALSE)
->execute(); ->execute();
$failed = 0; $failed = 0;
@ -312,12 +313,14 @@ class FixityCheckService implements FixityCheckServiceInterface {
$periodic = (int) $storage->getQuery('AND') $periodic = (int) $storage->getQuery('AND')
->count('id') ->count('id')
->condition('periodic', TRUE) ->condition('periodic', TRUE)
->accessCheck(FALSE)
->execute(); ->execute();
// All checks performed ever. // All checks performed ever.
$revisions = (int) $storage->getQuery('AND') $revisions = (int) $storage->getQuery('AND')
->allRevisions() ->allRevisions()
->count('id') ->count('id')
->accessCheck(FALSE)
->execute(); ->execute();
// Checks which have exceeded the threshold and should be performed again. // Checks which have exceeded the threshold and should be performed again.
@ -326,6 +329,7 @@ class FixityCheckService implements FixityCheckServiceInterface {
->condition('periodic', TRUE) ->condition('periodic', TRUE)
->condition('performed', $threshold, '>=') ->condition('performed', $threshold, '>=')
->count('id') ->count('id')
->accessCheck(FALSE)
->execute(); ->execute();
// Up to date checks. // Up to date checks.

Loading…
Cancel
Save