diff --git a/admin/modules.php b/admin/modules.php index c98fb974..05490b42 100644 --- a/admin/modules.php +++ b/admin/modules.php @@ -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 { diff --git a/docs/changelog.txt b/docs/changelog.txt index c507380d..9e149086 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -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)
3.04 Alpha 1 [2020-06-12]
Dev: XOOPS 2.5.11, PHP 7.4.5