aboutsummaryrefslogtreecommitdiffstats
path: root/install.php
diff options
context:
space:
mode:
authorgweltas <gweltas@piwigo.org>2004-03-20 00:52:37 +0000
committergweltas <gweltas@piwigo.org>2004-03-20 00:52:37 +0000
commit4128835db8d7b8e619951d4c31e23bd934758f09 (patch)
tree4fddd9ea03f3ebeeaba73c3a42f7130e29a54b58 /install.php
parent8850aabc34e524e1a7816c363657e3176502a708 (diff)
- Template migration
- Admin Control Panel migration - Language migration git-svn-id: http://piwigo.org/svn/trunk@393 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--install.php24
1 files changed, 10 insertions, 14 deletions
diff --git a/install.php b/install.php
index 706fba2ea..3d520be99 100644
--- a/install.php
+++ b/install.php
@@ -152,12 +152,7 @@ if ( !file_exists(@realpath(PHPWG_ROOT_PATH . 'language/' . $language . '/instal
}
include( './language/'.$language.'/install.lang.php' );
include( './language/'.$language.'/admin.lang.php' );
-$mapping_lang = $language;
-if ( !file_exists(@realpath(PHPWG_ROOT_PATH . 'language/' . $language . '/lang.lang.php')) )
-{
- $mapping_lang = 'en_EN';
-}
-include_once(PHPWG_ROOT_PATH . 'language/' . $mapping_lang . '/lang.lang.php');
+include_once(PHPWG_ROOT_PATH . 'language/infos.lang.php');
// Obtain various vars
$dbhost = (!empty($_POST['dbhost'])) ? $_POST['dbhost'] : 'localhost';
@@ -172,10 +167,6 @@ $admin_pass1 = (!empty($_POST['admin_pass1'])) ? $_POST['admin_pass1'] : '';
$admin_pass2 = (!empty($_POST['admin_pass2'])) ? $_POST['admin_pass2'] : '';
$admin_mail = (!empty($_POST['admin_mail'])) ? $_POST['admin_mail'] : '';
-$lang_options = $lang['lang'];
-@asort($lang_options);
-@reset($lang_options);
-
$infos = array();
$errors = array();
@@ -283,6 +274,12 @@ if ( isset( $_POST['install'] ))
$query.= " WHERE param = 'mail_webmaster'";
$query.= ';';
mysql_query( $query );
+
+ $query = 'UPDATE '.CONFIG_TABLE;
+ $query.= " SET value = '".$language."'";
+ $query.= " WHERE param = 'default_lang'";
+ $query.= ';';
+ mysql_query( $query );
$query = 'INSERT INTO '.SITES_TABLE;
$query.= " (id,galleries_url) VALUES (1, './galleries/');";
@@ -343,11 +340,10 @@ $template->assign_vars(array(
'F_DB_PREFIX'=>$table_prefix,
'F_ADMIN'=>$admin_name,
'F_ADMIN_EMAIL'=>$admin_mail,
- 'F_LANG_SELECT'=>make_jumpbox($lang_options, $language, true),
+ 'F_LANG_SELECT'=>language_select($language),
- 'T_CONTENT_ENCODING' => $lang['charset'],
- 'T_STYLE' => './template/'.$install_style.'/'.$install_style.'-admin.css')
- );
+ 'T_CONTENT_ENCODING' => $lang['default']['charset']
+ ));
//-------------------------------------------------------- errors & infos display
if ( sizeof( $errors ) != 0 )