Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
Merge branch 'fix/deinstallTables' into 'develop'
Browse files Browse the repository at this point in the history
remove plugin sql-tables on deinstallation

See merge request !5
  • Loading branch information
chfsx committed Oct 4, 2017
2 parents a8608ef + 4fa368b commit a0b432a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions classes/class.ilCtrlMainMenuPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}


2 changes: 1 addition & 1 deletion plugin.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
$id = 'ctrlmm';
$version = '3.3.08';
$version = '3.3.09';
$ilias_min_version = '5.1.000';
$ilias_max_version = '5.3.999';
$responsible = 'Fabian Schmid';
Expand Down

0 comments on commit a0b432a

Please sign in to comment.