From a854297e21cc9048cd4ab5882b7bbafd69a90feb Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 16 Jan 2016 19:20:55 +0100 Subject: [PATCH] Fixing uninstall and removing old modules --- Admin/Uninstall.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Admin/Uninstall.php b/Admin/Uninstall.php index 39eaf20..bd57489 100644 --- a/Admin/Uninstall.php +++ b/Admin/Uninstall.php @@ -17,6 +17,7 @@ namespace Modules\Tasks\Admin; use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\Schema\Builder; use phpOMS\Module\UninstallAbstract; /** @@ -36,8 +37,18 @@ class Uninstall extends UninstallAbstract /** * {@inheritdoc} */ - public static function unisntall(Pool $dbPool, array $info) + public static function uninstall(Pool $dbPool, array $info) { - parent::unisntall($dbPool, $info); + parent::uninstall($dbPool, $info); + + $query = new Builder($dbPool->get()); + + $query->prefix($dbPool->get('core')->getPrefix())->drop( + 'task_element', + 'task_account', + 'task' + ); + + $dbPool->get()->con->prepare($query->toSql())->execute(); } }