diff options
author | plegall <plg@piwigo.org> | 2010-04-28 14:28:05 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2010-04-28 14:28:05 +0000 |
commit | 73db66afa58cb14c6ced4163c10f4603a3399428 (patch) | |
tree | e5546bda92f92c4de6c1f104a66efebd3f462df3 /install.php | |
parent | aaa31653eee276541f693a42159c1ea40421dbfd (diff) |
feature 1630: upgrade to Piwigo 2.1 :-)
bug 1604: only activate core themes not all themes.
git-svn-id: http://piwigo.org/svn/trunk@5982 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | install.php | 46 |
1 files changed, 11 insertions, 35 deletions
diff --git a/install.php b/install.php index f56c32236..d35b1c6af 100644 --- a/install.php +++ b/install.php @@ -262,34 +262,8 @@ include(PHPWG_ROOT_PATH . 'admin/include/functions_upgrade.php'); if ( isset( $_POST['install'] )) { - if ($pwg_db_link = install_db_connect($infos, $errors)) - { - $required_version = constant('REQUIRED_'.strtoupper($dblayer).'_VERSION'); - if ( version_compare(pwg_get_db_version(), $required_version, '>=') ) - { - $pwg_charset = 'utf-8'; - $pwg_db_charset = 'utf8'; - if ($dblayer=='mysql') - { - $install_charset_collate = "DEFAULT CHARACTER SET $pwg_db_charset"; - pwg_query('SET NAMES "'.$pwg_db_charset.'"'); - } - else - { - $install_charset_collate = ''; - } - } - else - { - $pwg_charset = 'iso-8859-1'; - $pwg_db_charset = 'latin1'; - $install_charset_collate = ''; - if ( !array_key_exists($language, $languages->get_fs_languages($pwg_charset) ) ) - { - $language='en_UK'; - } - } - } + install_db_connect($infos, $errors); + pwg_db_check_charset(); $webmaster = trim(preg_replace( '/\s{2,}/', ' ', $admin_name )); if ( empty($webmaster)) @@ -320,8 +294,8 @@ $conf[\'db_host\'] = \''.$dbhost.'\'; $prefixeTable = \''.$prefixeTable.'\'; define(\'PHPWG_INSTALLED\', true); -define(\'PWG_CHARSET\', \''.$pwg_charset.'\'); -define(\'DB_CHARSET\', \''.$pwg_db_charset.'\'); +define(\'PWG_CHARSET\', \'utf-8\'); +define(\'DB_CHARSET\', \'utf8\'); define(\'DB_COLLATE\', \'\'); ?'.'>'; @@ -350,13 +324,15 @@ define(\'DB_COLLATE\', \'\'); execute_sqlfile( PHPWG_ROOT_PATH.'install/piwigo_structure-'.$dblayer.'.sql', DEFAULT_PREFIX_TABLE, - $prefixeTable + $prefixeTable, + $dblayer ); // We fill the tables with basic informations execute_sqlfile( PHPWG_ROOT_PATH.'install/config.sql', DEFAULT_PREFIX_TABLE, - $prefixeTable + $prefixeTable, + $dblayer ); $query = ' @@ -366,7 +342,7 @@ INSERT INTO '.$prefixeTable.'config (param,value,comment) pwg_query($query); // fill languages table - foreach ($languages->get_fs_languages($pwg_charset) as $language_code => $language_name) + foreach ($languages->get_fs_languages() as $language_code => $language_name) { $languages->perform_action('activate', $language_code); } @@ -378,9 +354,9 @@ INSERT INTO '.$prefixeTable.'config (param,value,comment) // themes class if (!defined('PWG_CHARSET')) { - define('PWG_CHARSET', $pwg_charset); + define('PWG_CHARSET', 'utf-8'); } - activate_all_themes(); + activate_core_themes(); $insert = array( 'id' => 1, |