diff --git a/classes/class.ilCtrlMainMenuPlugin.php b/classes/class.ilCtrlMainMenuPlugin.php index 10eed48..a60b7a2 100644 --- a/classes/class.ilCtrlMainMenuPlugin.php +++ b/classes/class.ilCtrlMainMenuPlugin.php @@ -104,6 +104,30 @@ protected function checkAR44() { } } } + + + /** + * @return bool true + */ + protected function beforeUninstall() { + + // drop the tables created by the CtrlMainMenu plugin + + require_once('./Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/CtrlMainMenu/classes/Entry/class.ctrlmmEntry.php'); + require_once('./Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/CtrlMainMenu/classes/class.ctrlmmData.php'); + require_once('./Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/CtrlMainMenu/classes/class.ctrlmmTranslation.php'); + require_once('./Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/CtrlMainMenu/classes/class.ilCtrlMainMenuPlugin.php'); + + /** $ilDB ilDB */ + global $ilDB; + + $ilDB->dropTable(ctrlmmEntry::TABLE_NAME, false); + $ilDB->dropTable(ctrlmmData::TABLE_NAME, false); + $ilDB->dropTable(ctrlmmTranslation::TABLE_NAME, false); + $ilDB->dropTable(ilCtrlMainMenuPlugin::CONFIG_TABLE, false); + + return true; + } } diff --git a/plugin.php b/plugin.php index 39c01db..3f4ac78 100644 --- a/plugin.php +++ b/plugin.php @@ -1,6 +1,6 @@