Skip to content

Commit

Permalink
Hard delete records on disable module
Browse files Browse the repository at this point in the history
  • Loading branch information
yurabakhtin committed May 1, 2023
1 parent 9e1cb62 commit e7453c7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function getContentContainerTypes()
public function disable()
{
foreach (Poll::find()->all() as $poll) {
$poll->delete();
$poll->hardDelete();
}

parent::disable();
Expand All @@ -64,7 +64,7 @@ public function disable()
public function disableContentContainer(ContentContainerActiveRecord $container)
{
foreach (Poll::find()->contentContainer($container)->all() as $poll) {
$poll->delete();
$poll->hardDelete();
}

parent::disableContentContainer($container);
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

1.3.0 (Unreleased)
-------------------------
- Fix #122: Hard delete records on disable module

1.2.2 (Unreleased)
-------------------------
- Fix #117: Fix responsive layout bug
Expand Down
8 changes: 4 additions & 4 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"name": "Polls",
"description": "Easy to use poll system",
"keywords": ["poll", "voting", "decision making"],
"version": "1.2.2",
"version": "1.3.0",
"humhub": {
"minVersion": "1.13"
"minVersion": "1.14"
},
"homepage": "https://github.com/humhub/polls",
"authors": [
Expand All @@ -20,8 +20,8 @@
}
],
"screenshots": [
"assets/screen1.PNG",
"assets/screen2.PNG",
"assets/screen1.PNG",
"assets/screen2.PNG",
"assets/screen3.PNG",
"assets/screen4.PNG"
]
Expand Down

0 comments on commit e7453c7

Please sign in to comment.