Changeset 5387 for trunk/upgrade.php


Ignore:
Timestamp:
Mar 26, 2010, 5:49:23 PM (14 years ago)
Author:
patdenice
Message:

Fix php5 apache configuration with upgrade.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/upgrade.php

    r5238 r5387  
    3939include_once(PHPWG_ROOT_PATH.'include/functions.inc.php');
    4040include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
    41 include_once(PHPWG_ROOT_PATH.'admin/include/functions_upgrade.php');
    4241
    4342include(PHPWG_ROOT_PATH.'local/config/database.inc.php');
    4443include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
    4544@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
     47define('USERS_TABLE', $prefixeTable.'users');
    5048include_once(PHPWG_ROOT_PATH.'include/constants.php');
    5149define('PREFIX_TABLE', $prefixeTable);
    52 
    53 // Database connection
    54 try
    55 {
    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();
    6550
    6651// +-----------------------------------------------------------------------+
     
    149134// |                             language                                  |
    150135// +-----------------------------------------------------------------------+
     136include(PHPWG_ROOT_PATH . 'admin/include/languages.class.php');
     137$languages = new languages('utf-8');
     138
    151139if (isset($_GET['language']))
    152140{
     
    157145  $language = 'en_UK';
    158146  // 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)
    160148  {
    161149    if (substr($language_code,0,2) == @substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2))
     
    206194  include(PHPWG_ROOT_PATH.'install/php5_apache_configuration.php');
    207195}
     196
     197// +-----------------------------------------------------------------------+
     198// |                          database connection                          |
     199// +-----------------------------------------------------------------------+
     200include_once(PHPWG_ROOT_PATH.'admin/include/functions_upgrade.php');
     201include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$conf['dblayer'].'.inc.php');
     202
     203upgrade_db_connect();
     204
     205pwg_db_check_charset();
    208206
    209207// +-----------------------------------------------------------------------+
Note: See TracChangeset for help on using the changeset viewer.