diff options
Diffstat (limited to 'phpBB/includes/acp/acp_modules.php')
-rw-r--r-- | phpBB/includes/acp/acp_modules.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php index c426e4607d..9b42b7b8ba 100644 --- a/phpBB/includes/acp/acp_modules.php +++ b/phpBB/includes/acp/acp_modules.php @@ -67,6 +67,17 @@ class acp_modules if (confirm_box(true)) { + // Make sure we are not directly within a module + if ($module_id == $this->parent_id) + { + $sql = 'SELECT parent_id + FROM ' . MODULES_TABLE . ' + WHERE module_id = ' . $module_id; + $result = $db->sql_query($sql); + $this->parent_id = (int) $db->sql_fetchfield('parent_id'); + $db->sql_freeresult($result); + } + $errors = $this->delete_module($module_id); if (!sizeof($errors)) |