summaryrefslogtreecommitdiff
path: root/core/helpers
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2009-01-08 06:52:18 +0000
committerAndy Staudacher <andy.st@gmail.com>2009-01-08 06:52:18 +0000
commit2917740ba6d210ef43d4de228f8386e3b28adf62 (patch)
tree596abbb05c57dd0f017727741dc38a1545125be7 /core/helpers
parente9d61d5f9df80e4304abf60f5dde99b54eefad71 (diff)
First step of i18n refactoring:
- Using DB table translations_incomings as translations storage (file cache to be added) - Removed overly complex i18n code which will be unnecessary with the future compiled cache files - Added t() as a translation function (global refactoring from _() to t() to follow)
Diffstat (limited to 'core/helpers')
-rw-r--r--core/helpers/core_installer.php21
1 files changed, 16 insertions, 5 deletions
diff --git a/core/helpers/core_installer.php b/core/helpers/core_installer.php
index d02d8465..15b97809 100644
--- a/core/helpers/core_installer.php
+++ b/core/helpers/core_installer.php
@@ -120,6 +120,18 @@ class core_installer {
UNIQUE KEY(`name`))
ENGINE=InnoDB DEFAULT CHARSET=utf8;");
+ $db->query("CREATE TABLE `translations_incomings` (
+ `id` int(9) NOT NULL auto_increment,
+ `key` char(32) NOT NULL,
+ `locale` char(10) NOT NULL,
+ `message` text NOT NULL,
+ `translation` text,
+ `revision` int(9) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY(`key`, `locale`),
+ KEY `locale_key` (`locale`, `key`))
+ ENGINE=InnoDB DEFAULT CHARSET=utf8;");
+
$db->query("CREATE TABLE `sessions` (
`session_id` varchar(127) NOT NULL,
`last_activity` int(10) UNSIGNED NOT NULL,
@@ -217,14 +229,13 @@ 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 `translations_incoming`;");
$db->query("DROP TABLE IF EXISTS `permissions`;");
$db->query("DROP TABLE IF EXISTS `sessions`;");
$db->query("DROP TABLE IF EXISTS `tasks`;");
$db->query("DROP TABLE IF EXISTS `vars`;");
- system("/bin/rm -rf " . VARPATH . "albums");
- system("/bin/rm -rf " . VARPATH . "resizes");
- system("/bin/rm -rf " . VARPATH . "thumbs");
- system("/bin/rm -rf " . VARPATH . "uploads");
- system("/bin/rm -rf " . VARPATH . "modules");
+ foreach (array("albums", "resizes", "thumbs", "uploads", "modules") as $dir) {
+ system("/bin/rm -rf " . VARPATH . $dir);
+ }
}
}