Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions admin/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,22 @@
if (!$GLOBALS['xoopsSecurity']->check()) {
\redirect_header('modules.php', 3, \implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
//delete all morefiles
$critDelete = new \CriteriaCompo();
$critDelete->add(new \Criteria('file_mid', $modId));
$helper->getHandler('Morefiles')->deleteAll($critDelete);
unset($critDelete);
//delete all fields
$critDelete = new \CriteriaCompo();
$critDelete->add(new \Criteria('field_mid', $modId));
$helper->getHandler('Fields')->deleteAll($critDelete);
unset($critDelete);
//delete all tables
$critDelete = new \CriteriaCompo();
$critDelete->add(new \Criteria('table_mid', $modId));
$helper->getHandler('Tables')->deleteAll($critDelete);
unset($critDelete);
//delete module
if ($helper->getHandler('Modules')->delete($modulesObj)) {
\redirect_header('modules.php', 3, _AM_MODULEBUILDER_FORMDELOK);
} else {
Expand Down
3 changes: 2 additions & 1 deletion docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
- added default type and value for table fieldelements (goffy)
- fixed bug in deleting table from fieldelements (goffy)
- added check for sql creation (goffy)
- delete fields if table is deleted (goffy)
- delete fields when deleting table (goffy)
- delete fields, tables, morefiles when deleting module (goffy)

<h5>3.04 Alpha 1 [2020-06-12]</h5> Dev: XOOPS 2.5.11, PHP 7.4.5
<hr>
Expand Down