aboutsummaryrefslogtreecommitdiffstats
path: root/install.php
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2010-03-25 10:27:17 +0000
committerpatdenice <patdenice@piwigo.org>2010-03-25 10:27:17 +0000
commit06c7acda4fcc465ee5f7bd29ae47ee380535ba83 (patch)
tree190d28cf8dfaa4487b5e6930dba2cd5a3b917e44 /install.php
parent663be9ca638c12d889036d5143fd6553f2575373 (diff)
Feature 1535: Add languages table.
Ready for theme manager! git-svn-id: http://piwigo.org/svn/trunk@5341 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'install.php')
-rw-r--r--install.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/install.php b/install.php
index 6e47bafe8..e1d7a96fe 100644
--- a/install.php
+++ b/install.php
@@ -273,11 +273,12 @@ if ( isset( $_POST['install'] ))
$pwg_db_charset = 'utf8';
if ($dblayer=='mysql')
{
- $install_charset_collate = "DEFAULT CHARACTER SET $pwg_db_charset";
+ $install_charset_collate = "DEFAULT CHARACTER SET $pwg_db_charset";
+ pwg_query('SET NAMES "'.$pwg_db_charset.'"');
}
else
{
- $install_charset_collate = '';
+ $install_charset_collate = '';
}
}
else
@@ -373,6 +374,17 @@ INSERT INTO '.$prefixeTable.'config (param,value,comment)
\'a secret key specific to the gallery for internal use\');';
pwg_query($query);
+ // fill languages table
+ $inserts = array();
+ foreach (get_languages('utf-8') as $language_code => $language_name)
+ {
+ $inserts[] = array(
+ 'id' => $language_code,
+ 'name' => $language_name,
+ );
+ }
+ mass_inserts(LANGUAGES_TABLE, array('id', 'name'), $inserts);
+
// fill $conf global array
load_conf_from_db();