mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-05 09:22:21 +02:00
Feature 1535: Add languages table.
Ready for theme manager! git-svn-id: http://piwigo.org/svn/trunk@5341 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
+14
-2
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user