Fixing uninstall and removing old modules

This commit is contained in:
Dennis Eichhorn 2016-01-16 19:20:55 +01:00
parent 5c817521d1
commit 5f7db163b9

View File

@ -17,6 +17,7 @@ namespace Modules\News\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(
'news_group',
'news_tag',
'news'
);
$dbPool->get()->con->prepare($query->toSql())->execute();
}
}