<?php
/*
* @package LabCMS
* @copyright (c) 2006 Alexander Levin aka Loki (loki_angel@mail.ru)
* @support http://labcms.ru
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
$success=true;

set_time_limit(0);

//если не установлен модуль lc_ec
if (!$id=Db::i()->selectCell("SELECT module_id FROM ?_modules WHERE module='lc_ec'")) {
	Db::i()->query("ALTER TABLE  ?_users ADD `real_id` INT NULL DEFAULT NULL;");
} else {
	Db::i()->query("DELETE FROM ?_modules WHERE module='lc_ec'");
	Db::i()->query("DELETE FROM ?_includes WHERE module_id=?", $id);
}

