diff --git a/src/FixityCheckAccessControlHandler.php b/src/FixityCheckAccessControlHandler.php index 0fbf552..af721a1 100644 --- a/src/FixityCheckAccessControlHandler.php +++ b/src/FixityCheckAccessControlHandler.php @@ -24,6 +24,7 @@ class FixityCheckAccessControlHandler extends EntityAccessControlHandler { case 'view revision': return AccessResult::allowedIfHasPermission($account, 'view fixity checks')->cachePerPermissions(); + case 'update': case 'delete': return AccessResult::allowedIfHasPermission($account, $admin_permission)->cachePerPermissions(); diff --git a/src/FixityCheckBatchCheck.php b/src/FixityCheckBatchCheck.php index e0aa93c..eb7f373 100644 --- a/src/FixityCheckBatchCheck.php +++ b/src/FixityCheckBatchCheck.php @@ -179,7 +179,7 @@ class FixityCheckBatchCheck { } $files = $storage->getPeriodic($sandbox['offset'], $batch_size); - $end = min($sandbox['total'], $sandbox['offset'] + count($files)); + $end = min($sandbox['remaining'], $sandbox['offset'] + count($files)); $context['message'] = \t('Processing @start to @end', [ '@start' => $sandbox['offset'], '@end' => $end, @@ -219,6 +219,9 @@ class FixityCheckBatchCheck { if ($result->passed()) { $results['successful']++; } + else { + $results['failed']++; + } } else { // The check was not performed as the time elapsed since the last diff --git a/src/FixityCheckServiceInterface.php b/src/FixityCheckServiceInterface.php index c719418..347da6a 100644 --- a/src/FixityCheckServiceInterface.php +++ b/src/FixityCheckServiceInterface.php @@ -100,7 +100,7 @@ interface FixityCheckServiceInterface { * elapsed since the last check has not exceed the required threshold. * * @return \Drupal\dgi_fixity\Entity\FixityCheckInterface|null - * The resulting fixity_check if successful. + * The resulting fixity_check if performed. * NULL if the check was not performed because the time elapsed since the * last check has not exceed the required threshold. */