Changeset 5387 for trunk/upgrade.php
- Timestamp:
- Mar 26, 2010, 5:49:23 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/upgrade.php
r5238 r5387 39 39 include_once(PHPWG_ROOT_PATH.'include/functions.inc.php'); 40 40 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 41 include_once(PHPWG_ROOT_PATH.'admin/include/functions_upgrade.php');42 41 43 42 include(PHPWG_ROOT_PATH.'local/config/database.inc.php'); 44 43 include(PHPWG_ROOT_PATH . 'include/config_default.inc.php'); 45 44 @include(PHPWG_ROOT_PATH. 'local/config/config.inc.php'); 46 include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$conf['dblayer'].'.inc.php'); 47 48 prepare_conf_upgrade(); 49 45 46 // $conf is not used for users tables - define cannot be re-defined 47 define('USERS_TABLE', $prefixeTable.'users'); 50 48 include_once(PHPWG_ROOT_PATH.'include/constants.php'); 51 49 define('PREFIX_TABLE', $prefixeTable); 52 53 // Database connection54 try55 {56 $pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'],57 $conf['db_password'], $conf['db_base']);58 }59 catch (Exception $e)60 {61 my_error(l10n($e->getMessage(), true));62 }63 64 pwg_db_check_charset();65 50 66 51 // +-----------------------------------------------------------------------+ … … 149 134 // | language | 150 135 // +-----------------------------------------------------------------------+ 136 include(PHPWG_ROOT_PATH . 'admin/include/languages.class.php'); 137 $languages = new languages('utf-8'); 138 151 139 if (isset($_GET['language'])) 152 140 { … … 157 145 $language = 'en_UK'; 158 146 // Try to get browser language 159 foreach ( get_languages('utf-8')as $language_code => $language_name)147 foreach ($languages->fs_languages as $language_code => $language_name) 160 148 { 161 149 if (substr($language_code,0,2) == @substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2)) … … 206 194 include(PHPWG_ROOT_PATH.'install/php5_apache_configuration.php'); 207 195 } 196 197 // +-----------------------------------------------------------------------+ 198 // | database connection | 199 // +-----------------------------------------------------------------------+ 200 include_once(PHPWG_ROOT_PATH.'admin/include/functions_upgrade.php'); 201 include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$conf['dblayer'].'.inc.php'); 202 203 upgrade_db_connect(); 204 205 pwg_db_check_charset(); 208 206 209 207 // +-----------------------------------------------------------------------+
Note: See TracChangeset
for help on using the changeset viewer.