Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Roberts committed Sep 17, 2019
2 parents 376b8c7 + db61b2b commit eacfd3d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/services/EventHandlerService.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ public function handleBeforeDeleteElementEvent(ElementEvent $event)
]);

if ($element instanceof Entry && $element->sectionId) {
$all = in_array($element->sectionId, $this->settings->sections);
$all = $this->settings->sections === '*' ||
in_array($event->element->sectionId, $this->settings->sections);
$this->cacheService->triggerPurge($all);
}
}
Expand Down Expand Up @@ -158,7 +159,8 @@ public function handleBeforeMoveElementEvent(MoveElementEvent $event)
]);

if ($element instanceof Entry && $element->sectionId) {
$all = in_array($element->sectionId, $this->settings->sections);
$all = $this->settings->sections === '*' ||
in_array($event->element->sectionId, $this->settings->sections);
$this->cacheService->triggerPurge($all);
}
}
Expand Down

0 comments on commit eacfd3d

Please sign in to comment.