aboutsummaryrefslogtreecommitdiffstats
path: root/install.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-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();