Файл: housetrack/modules/friends/helpers/friends_installer.php
Строк: 43
<?php
/**
* MobileCMS
*
* Open source content management system for mobile sites
*
* @author MobileCMS Team <support@mobilecms.ru>
* @copyright Copyright (c) 2011, MobileCMS Team
* @link http://mobilecms.ru Official site
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
defined('IN_SYSTEM') or die('<b>403<br />Запрет доступа!</b>');
//---------------------------------------------
/**
* Хелпер установки модуля
*/
class friends_installer {
/**
* Установка модуля
*/
public static function install(&$db) {
$db->query("CREATE TABLE IF NOT EXISTS #__friends (
`id` int(11) NOT NULL auto_increment,
`friends_user_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`status` enum('new','ok') NOT NULL default 'new',
`time` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `friends_user_id` (`friends_user_id`,`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
");
main::add_event('friends', 'pre_controller');
}
/**
* Деинсталляция модуля
*/
public static function uninstall(&$db) {
$db->query("DROP TABLE #__friends;");
main::delete_event('friends');
}
}
?>