public function delete_module($id)
{
if ($this->app->user_manager->is_admin() == false) {
return false;
}
$id = intval($id);
$table = $this->tables['modules'];
$db_categories = get_table_prefix() . 'categories';
$db_categories_items = get_table_prefix() . 'categories_items';
$this->app->database_manager->delete_by_id($table, $id);
$q = "DELETE FROM {$db_categories_items} WHERE rel_type='modules' AND rel_id={$id}";
$this->app->database_manager->q($q);
$this->app->cache_manager->delete('categories' . DIRECTORY_SEPARATOR . '');
$this->app->cache_manager->delete('modules' . DIRECTORY_SEPARATOR . '');
}