diff options
author | Felix Rabinovich <virshu@users.sourceforge.net> | 2009-01-09 23:31:46 +0000 |
---|---|---|
committer | Felix Rabinovich <virshu@users.sourceforge.net> | 2009-01-09 23:31:46 +0000 |
commit | b647aa0f74e66548d6d69fc4585b89220ce60043 (patch) | |
tree | 81c78a1d1694462d45db75ab7f56d9c3cbc192de /core/helpers/core_installer.php | |
parent | 1e14594d689a1150e922a5f5fe01956be4ccaf21 (diff) |
Theme Administration v. 2. Doesn't distinguish between regular and admin themes yet
Diffstat (limited to 'core/helpers/core_installer.php')
-rw-r--r-- | core/helpers/core_installer.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/helpers/core_installer.php b/core/helpers/core_installer.php index 043af641..115aca20 100644 --- a/core/helpers/core_installer.php +++ b/core/helpers/core_installer.php @@ -112,6 +112,14 @@ class core_installer { UNIQUE KEY(`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + $db->query("CREATE TABLE `themes` ( + `id` int(9) NOT NULL auto_increment, + `name` varchar(64) default NULL, + `version` int(9) default NULL, + PRIMARY KEY (`id`), + UNIQUE KEY(`name`)) + ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + $db->query("CREATE TABLE `permissions` ( `id` int(9) NOT NULL auto_increment, `name` varchar(64) default NULL, @@ -216,6 +224,15 @@ class core_installer { "missing_graphics_toolkit"); } + // Instantiate default themes (regular and admin) + foreach (array("default", "admin_default") as $theme_name) { + $theme_info = new ArrayObject(parse_ini_file(THEMEPATH . $theme_name . "/theme.info"), + ArrayObject::ARRAY_AS_PROPS); + $theme = ORM::factory("theme"); + $theme->name = $theme_name; + $theme->version = $theme_info->version; + $theme->save(); + } module::set_version("core", 1); } } @@ -229,6 +246,7 @@ class core_installer { $db->query("DROP TABLE IF EXISTS `logs`;"); $db->query("DROP TABLE IF EXISTS `messages`;"); $db->query("DROP TABLE IF EXISTS `modules`;"); + $db->query("DROP TABLE IF EXISTS `themes`;"); $db->query("DROP TABLE IF EXISTS `translations_incoming`;"); $db->query("DROP TABLE IF EXISTS `permissions`;"); $db->query("DROP TABLE IF EXISTS `sessions`;"); |