Skip to content

Commit

Permalink
added: restorable capability
Browse files Browse the repository at this point in the history
  • Loading branch information
jeabakker committed Jun 19, 2024
1 parent 0436563 commit 8337069
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion classes/ColdTrick/Questions/Access.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function updateAnswerAccessToQuestionAccess(\Elgg\Event $event): v
}

// ignore access for this part
elgg_call(ELGG_IGNORE_ACCESS, function() use ($entity) {
elgg_call(ELGG_IGNORE_ACCESS | ELGG_SHOW_DELETED_ENTITIES, function() use ($entity) {
$answers = $entity->getAnswers([
'limit' => false,
'batch' => true,
Expand Down
2 changes: 1 addition & 1 deletion classes/ElggAnswer.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected function persistentDelete(bool $recursive = true): bool {
// make sure the question gets reopened
if ($this->isCorrectAnswer()) {
// only if this is the correct answer
elgg_call(ELGG_IGNORE_ACCESS, function() {
elgg_call(ELGG_IGNORE_ACCESS | ELGG_SHOW_DELETED_ENTITIES, function() {
$this->undoMarkAsCorrect();
});
}
Expand Down
1 change: 1 addition & 0 deletions elgg-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
'commentable' => true,
'searchable' => true,
'likable' => true,
'restorable' => true,
],
],
[
Expand Down

0 comments on commit 8337069

Please sign in to comment.