Feature 928 resolved.

Replace include/mysql.inc.php by include/config_database.inc.php to be independant of database engine
Rename database configurations variables by ones in $conf array.

git-svn-id: http://piwigo.org/svn/trunk@4280 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
nikrou 2009-11-16 19:17:01 +00:00
commit 8a29965450
25 changed files with 46 additions and 43 deletions

View file

@ -159,7 +159,7 @@ WHERE username = "'.$username.'"
{
$query = '
SELECT u.password, ui.status
FROM '.$conf['users_table'].' AS u
FROM '.USERS_TABLE.' AS u
INNER JOIN '.USER_INFOS_TABLE.' AS ui
ON u.'.$conf['user_fields']['id'].'=ui.user_id
WHERE '.$conf['user_fields']['username'].'="'.$username.'"

View file

@ -70,7 +70,7 @@ $header_msgs = array();
$header_notes = array();
$filter = array();
@include(PHPWG_ROOT_PATH .'include/mysql.inc.php');
@include(PHPWG_ROOT_PATH .'include/config_database.inc.php');
if (!defined('PHPWG_INSTALLED'))
{
header('Location: install.php');
@ -104,8 +104,8 @@ include(PHPWG_ROOT_PATH . 'include/functions.inc.php');
include( PHPWG_ROOT_PATH .'include/template.class.php');
// Database connection
@mysql_connect( $cfgHote, $cfgUser, $cfgPassword ) or my_error( 'mysql_connect', true );
@mysql_select_db( $cfgBase ) or my_error( 'mysql_select_db', true );
@mysql_connect( $conf['db_host'], $conf['db_user'], $conf['db_password'] ) or my_error( 'mysql_connect', true );
@mysql_select_db( $conf['db_base'] ) or my_error( 'mysql_select_db', true );
defined('PWG_CHARSET') and defined('DB_CHARSET')
or fatal_error('PWG_CHARSET and/or DB_CHARSET is not defined');

View file

@ -494,7 +494,10 @@ $conf['apache_authentication'] = false;
//
// All informations contained in these tables and column are related to
// piwigo_users table.
$conf['users_table'] = $prefixeTable.'users';
//
// You can use a different table for users, if you define associated constant
// default configuration :
// define('USERS_TABLE', $prefixeTable.'users');
// Other tables can be changed, if you define associated constants
// Example:

View file

@ -68,7 +68,7 @@ if (!defined('USER_ACCESS_TABLE'))
if (!defined('USER_GROUP_TABLE'))
define('USER_GROUP_TABLE', $prefixeTable.'user_group');
if (!defined('USERS_TABLE'))
define('USERS_TABLE', $conf['users_table']);
define('USERS_TABLE', $prefixeTable.'users');
if (!defined('USER_INFOS_TABLE'))
define('USER_INFOS_TABLE', $prefixeTable.'user_infos');
if (!defined('USER_FEED_TABLE'))

View file

@ -168,7 +168,7 @@ $infos = array();
$errors = array();
// Open config.php ... if it exists
$config_file = PHPWG_ROOT_PATH.'include/mysql.inc.php';
$config_file = PHPWG_ROOT_PATH.'include/config_database.inc.php';
if (@file_exists($config_file))
{
include($config_file);
@ -291,10 +291,10 @@ if ( isset( $_POST['install'] ))
{
$step = 2;
$file_content = '<?php
$cfgBase = \''.$dbname.'\';
$cfgUser = \''.$dbuser.'\';
$cfgPassword = \''.$dbpasswd.'\';
$cfgHote = \''.$dbhost.'\';
$conf[\'db_base\'] = \''.$dbname.'\';
$conf[\'db_user\'] = \''.$dbuser.'\';
$conf[\'db_password\'] = \''.$dbpasswd.'\';
$conf[\'db_host\'] = \''.$dbhost.'\';
$prefixeTable = \''.$table_prefix.'\';

View file

@ -255,7 +255,7 @@ ALTER TABLE t1 CHANGE c1 c1 TEXT CHARACTER SET utf8;
// +-----------------------------------------------------------------------+
// changes to write in mysql.inc.php
// changes to write in config_database.inc.php
array_push($mysql_changes,
'define(\'PWG_CHARSET\', \''.$pwg_charset.'\');
define(\'DB_CHARSET\', \''.$db_charset.'\');

View file

@ -173,7 +173,7 @@ $list_files = array(
'include_phpwebgallery',
'include_phpwebgallery/config.php',
'include_phpwebgallery/index.htm',
'include_phpwebgallery/mysql.inc.php',
'include_phpwebgallery/config_database.inc.php',
'index.htm',
// Comparison between phpwebgallery-1.2.1 and phpwebgallery-1.1.0
'admin/isadmin.php',
@ -927,7 +927,7 @@ $list_files = array(
// Comparison between trunk-r3105 and phpwebgallery-2.0.0RC4
'admin/template/goto/theme/roma/images/bottom-left-bg.png',
'admin/template/goto/theme/roma/images/top-left-bg.png',
'include/mysql.inc.php',
'include/config_database.inc.php',
'template-common/lib/ui/ui.accordion.packed.js',
'template-common/lib/ui/ui.core.packed.js',
'template-common/lib/ui/ui.datepicker.css',
@ -943,7 +943,7 @@ $list_files = array(
);
$list_exlude_files = array(
'include/mysql.inc.php',
'include/config_database.inc.php',
);

View file

@ -579,7 +579,7 @@ UPDATE '.CATEGORIES_TABLE.'
}
// load the config file
$config_file = PHPWG_ROOT_PATH.'include/mysql.inc.php';
$config_file = PHPWG_ROOT_PATH.'include/config_database.inc.php';
$config_file_contents = @file_get_contents($config_file);
if ($config_file_contents === false)
{
@ -595,7 +595,7 @@ if (!is_writable($config_file))
die('FILE NOT WRITABLE '.$config_file);
}
// changes to write in mysql.inc.php
// changes to write in config_database.inc.php
array_push($mysql_changes, 'define(\'PHPWG_INSTALLED\', true);');
// Send infos

View file

@ -54,7 +54,7 @@ $lang['step2_pwd'] = 'Passwort';
$lang['step2_pwd_info'] = 'Administratorpasswort';
$lang['step2_pwd_conf'] = 'Passwort [Best&auml;tigung]';
$lang['step2_pwd_conf_info'] = 'Wiederholen Sie das eingegebene Passwort';
$lang['step1_err_copy'] = 'Kopieren Sie den rosa Text ohne die Bindestriche und fügen Sie ihn in die Datei "include / mysql.inc.php" auf dem Webserver ein (Warnung: die Datei "mysql.inc.php" darf nur die rosa Zeichen enthalten, nicht mehr und nicht weniger)';
$lang['step1_err_copy'] = 'Kopieren Sie den rosa Text ohne die Bindestriche und fügen Sie ihn in die Datei "include / config_database.inc.php" auf dem Webserver ein (Warnung: die Datei "config_database.inc.php" darf nur die rosa Zeichen enthalten, nicht mehr und nicht weniger)';
$lang['install_help'] = 'Brauchen Sie Hilfe? Stellen Sie Ihre Frage auf der <a href="%s"> Forum Piwigo </a>.';
$lang['install_end_message'] = 'Die Konfiguration der Piwigo abgeschlossen ist, hier ist der n&auml;chste Schritt<br><br>
* Gehen Sie zum Anmelden auf die Startseite: [ <a href="./identification.php">Identifizierung</a> ] und verwenden Sie die Login / Passwort für Webmaster<br>

View file

@ -34,7 +34,7 @@ $lang['perform a maintenance check'] = 'Führen Sie einen Wartungs-Check am [Adm
$lang['deactivated plugins'] = 'Als Vorsichtsmaßnahme folgenden Plugins wurden deaktiviert. Sie müssen prüfen, ob Plugins aktualisieren, bevor sie reactiving:';
$lang['upgrade login message'] = 'Nur Administrator können Upgrade ausführen : Bitte melden Sie sich an unter.';
$lang['You do not have access rights to run upgrade'] = 'Sie haben nicht das Recht auf Zugang zum Upgrade ausführen';
$lang['in include/mysql.inc.php, before ?>, insert:'] = 'In <i>include/mysql.inc.php</i>, vor <b>?></b>, wird Folgendes eingefügt:';
$lang['in include/config_database.inc.php, before ?>, insert:'] = 'In <i>include/config_database.inc.php</i>, vor <b>?></b>, wird Folgendes eingefügt:';
// Upgrade informations from upgrade_1.3.1.php
$lang['all sub-categories of private categories become private'] = 'Alle Unter-Kategorien von privaten Gruppen wirden privaten';

View file

@ -37,7 +37,7 @@ $lang['step1_err_db'] = 'Connection to server succeed, but it was impossible to
$lang['step1_err_server'] = 'Can\'t connect to server';
$lang['step1_err_copy_2'] = 'The next step of the installation is now possible';
$lang['step1_err_copy_next'] = 'next step';
$lang['step1_err_copy'] = 'Copy the text in pink between hyphens and paste it into the file "include/mysql.inc.php"(Warning : mysql.inc.php must only contain what is in pink, no line return or space character)';
$lang['step1_err_copy'] = 'Copy the text in pink between hyphens and paste it into the file "include/config_database.inc.php"(Warning : config_database.inc.php must only contain what is in pink, no line return or space character)';
$lang['step1_host'] = 'MySQL host';
$lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';

View file

@ -34,7 +34,7 @@ $lang['perform a maintenance check'] = 'Perform a maintenance check in [Administ
$lang['deactivated plugins'] = 'As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them:';
$lang['upgrade login message'] = 'Only administrator can run upgrade: please sign in below.';
$lang['You do not have access rights to run upgrade'] = 'You do not have access rights to run upgrade';
$lang['in include/mysql.inc.php, before ?>, insert:'] = 'In <i>include/mysql.inc.php</i>, before <b>?></b>, insert:';
$lang['in include/config_database.inc.php, before ?>, insert:'] = 'In <i>include/config_database.inc.php</i>, before <b>?></b>, insert:';
// Upgrade informations from upgrade_1.3.1.php
$lang['all sub-categories of private categories become private'] = 'All sub-categories of private categories become private';

View file

@ -54,7 +54,7 @@ $lang['step2_pwd'] = 'Palabra de paso';
$lang['step2_pwd_info'] = 'Debe quedar confidencial, permite acceder al tabla de administración.';
$lang['step2_pwd_conf'] = 'Palabra de paso [Confirmar]';
$lang['step2_pwd_conf_info'] = 'Comprobación';
$lang['step1_err_copy'] = 'Copie el texto en rosa entre las rayas y pegúelo en el fichero mysql.inc.php que se encuentra en el repertorio " include " a la base del lugar donde usted instaló a Piwigo (el fichero mysql.inc.php debe contener SÓLO lo que está en rosa entre las rayas, ninguna vuelta a la línea o espacio es autorizado)';
$lang['step1_err_copy'] = 'Copie el texto en rosa entre las rayas y pegúelo en el fichero config_database.inc.php que se encuentra en el repertorio " include " a la base del lugar donde usted instaló a Piwigo (el fichero config_database.inc.php debe contener SÓLO lo que está en rosa entre las rayas, ninguna vuelta a la línea o espacio es autorizado)';
$lang['install_help'] = '¿ Necesidad de ayudante? Plantee su cuestión sobre él <a href="%s">foro de Piwigo</a>.';
$lang['install_end_message'] = 'La configuración de la aplicación correctamente se celebró, coloca en la etapa próxima<br><br>
* Vaya sobre la página de identificación y conéctese con pseudo dado para el webmaster<br>

View file

@ -34,7 +34,7 @@ $lang['perform a maintenance check'] = 'Por favor, efectúes un mantenimiento en
$lang['deactivated plugins'] = 'Por precaución, el plugins siguiente han sido desactivados. Verifique si existen unas posturas al día antes de reactivarlas:';
$lang['upgrade login message'] = 'Sólo un administrador puede lanzar la puesta al día: por favor, identifiqúese más abajo.';
$lang['You do not have access rights to run upgrade'] = 'Usted no tiene los derechos necessaires para lanzar la puesta al día.';
/* TODO */$lang['in include/mysql.inc.php, before ?>, insert:'] = 'In <i>include/mysql.inc.php</i>, before <b>?></b>, insert:';
/* TODO */$lang['in include/config_database.inc.php, before ?>, insert:'] = 'In <i>include/config_database.inc.php</i>, before <b>?></b>, insert:';
// Upgrade informations from upgrade_1.3.1.php
$lang['all sub-categories of private categories become private'] = 'Todas las subcategorías de categorías privadas se vuelven privadas';

View file

@ -54,7 +54,7 @@ $lang['step2_pwd'] = 'Mot de passe';
$lang['step2_pwd_info'] = 'Il doit rester confidentiel, il permet d\'accéder au panneau d\'administration.';
$lang['step2_pwd_conf'] = 'Mot de passe [ Confirmer ]';
$lang['step2_pwd_conf_info'] = 'Vérification';
$lang['step1_err_copy'] = 'Copiez le texte en rose entre les tirets et collez-le dans le fichier mysql.inc.php qui se trouve dans le répertoire "include" à la base de l\'endroit où vous avez installé Piwigo (le fichier mysql.inc.php ne doit comporter QUE ce qui est en rose entre les tirets, aucun retour à la ligne ou espace n\'est autorisé)';
$lang['step1_err_copy'] = 'Copiez le texte en rose entre les tirets et collez-le dans le fichier config_database.inc.php qui se trouve dans le répertoire "include" à la base de l\'endroit où vous avez installé Piwigo (le fichier config_database.inc.php ne doit comporter QUE ce qui est en rose entre les tirets, aucun retour à la ligne ou espace n\'est autorisé)';
$lang['install_help'] = 'Besoin d\'aide ? Posez votre question sur le <a href="%s">forum de Piwigo</a>.';
$lang['install_end_message'] = 'La configuration de l\'application s\'est correctement déroulée, place à la prochaine étape<br><br>
* allez sur la page d\'identification et connectez-vous avec le pseudo donné pour le webmaster<br>

View file

@ -34,7 +34,7 @@ $lang['perform a maintenance check'] = 'Veuillez effectuer une maintenance dans
$lang['deactivated plugins'] = 'Par précaution, les plugins suivants ont été désactivés. Vérifiez s\'il existe des mises à jour avant de les réactiver:';
$lang['upgrade login message'] = 'Seul un administrateur peut lancer la mise à jour: veuillez vous identifier ci-dessous.';
$lang['You do not have access rights to run upgrade'] = 'Vous n\'avez pas les droits necessaires pour lancer la mise à jour.';
$lang['in include/mysql.inc.php, before ?>, insert:'] = 'Dans le fichier <i>include/mysql.inc.php</i>, avant <b>?></b>, insérez:';
$lang['in include/config_database.inc.php, before ?>, insert:'] = 'Dans le fichier <i>include/config_database.inc.php</i>, avant <b>?></b>, insérez:';
// Upgrade informations from upgrade_1.3.1.php
$lang['all sub-categories of private categories become private'] = 'Toutes les sous-catégories de catégories privées deviennent privées';

View file

@ -54,7 +54,7 @@ $lang['step2_pwd'] = 'Password';
$lang['step2_pwd_info'] = 'da conservare con cura. Permette l\'accesso al pannello di amministrazione';
$lang['step2_pwd_conf'] = 'Password [confermare]';
$lang['step2_pwd_conf_info'] = 'verifica';
$lang['step1_err_copy'] = 'Copiate il testo in rosa trà i trattini e mettetelo nel file mysql.inc.php che si trova nella directory "include" alla base del vostro sito dove aveto installato Piwigo (il file mysql.inc.php non deve contenere altro che ciò che è in rosa tra i trattini, nessun ritorno a capo o spazio è autorizzato)';
$lang['step1_err_copy'] = 'Copiate il testo in rosa trà i trattini e mettetelo nel file config_database.inc.php che si trova nella directory "include" alla base del vostro sito dove aveto installato Piwigo (il file config_database.inc.php non deve contenere altro che ciò che è in rosa tra i trattini, nessun ritorno a capo o spazio è autorizzato)';
$lang['install_help'] = 'Bisogno di un aiuto? Visitate il <a href="%s">forum di Piwigo</a>.';
$lang['install_end_message'] = 'La configurazione di Piwigo è conclusa. Procedete al prossimo step<br><br>
* collegatevi alla pagina d\'accesso e usare come nome d\'utente e password quello del Webmaster<br>

View file

@ -34,7 +34,7 @@ $lang['perform a maintenance check'] = 'Se riscontrate dei problemi, effettuare
$lang['deactivated plugins'] = 'Per precauzione, i plugins sono stati disattivati. Verificate se non esistono degli aggiornamenti prima di riattivarli:';
$lang['upgrade login message'] = 'Solo un\'amministratore può eseguire l\'aggiornamento: identificatevi.';
$lang['You do not have access rights to run upgrade'] = 'Non avete le autorizzazioni necessarie per effettuare l\'aggiornamento';
$lang['in include/mysql.inc.php, before ?>, insert:'] = 'Nel file <i>include/mysql.inc.php</i>, prima di <b>?></b>, inserire:';
$lang['in include/config_database.inc.php, before ?>, insert:'] = 'Nel file <i>include/config_database.inc.php</i>, prima di <b>?></b>, inserire:';
// Upgrade informations from upgrade_1.3.1.php
$lang['all sub-categories of private categories become private'] = 'Tutte le sottocategorie delle categorie private diventono private';

View file

@ -37,7 +37,7 @@ $lang['step1_err_db'] = 'De verbinding met de server is geslaagd, maar het is ni
$lang['step1_err_server'] = 'Geen verbinding met de server';
$lang['step1_err_copy_2'] = 'Het is nu mogelijk om verder te gaan met de volgende stap van de installatie';
$lang['step1_err_copy_next'] = 'volgende stap';
$lang['step1_err_copy'] = 'Kopieer de tekst tussen de lijnen en plak deze in het bestand "include/mysql.inc.php"(Waarschuwing: mysql.inc.php mag alleen het roze gedeelte bevatten, geen return of extra spatie). Dit moet alleen wanneer dit bestand geen schrijfrechten';
$lang['step1_err_copy'] = 'Kopieer de tekst tussen de lijnen en plak deze in het bestand "include/config_database.inc.php"(Waarschuwing: config_database.inc.php mag alleen het roze gedeelte bevatten, geen return of extra spatie). Dit moet alleen wanneer dit bestand geen schrijfrechten';
$lang['step1_host'] = 'MySQL host';
$lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';

View file

@ -35,7 +35,7 @@ $lang['perform a maintenance check'] = 'Perform a maintenance check in [Administ
$lang['deactivated plugins'] = 'As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them:';
$lang['upgrade login message'] = 'Only administrator can run upgrade: please sign in below.';
$lang['You do not have access rights to run upgrade'] = 'You do not have access rights to run upgrade';
$lang['in include/mysql.inc.php, before ?>, insert:'] = 'In <i>include/mysql.inc.php</i>, before <b>?></b>, insert:';
$lang['in include/config_database.inc.php, before ?>, insert:'] = 'In <i>include/config_database.inc.php</i>, before <b>?></b>, insert:';
// Upgrade informations from upgrade_1.3.1.php
$lang['all sub-categories of private categories become private'] = 'All sub-categories of private categories become private';

View file

@ -37,7 +37,7 @@ $lang['step1_err_db'] = 'Połączenie do serwera powiodło się, ale nie było m
$lang['step1_err_server'] = 'Nie można połączyć sie do serwera';
$lang['step1_err_copy_2'] = 'Teraz mozliwy jest następny krok instalacji';
$lang['step1_err_copy_next'] = 'następny krok';
$lang['step1_err_copy'] = 'Skopiuj tekst zaznaczony na różowo pomiędzy cudzysłowiami i wklej do pliku "include/mysql.inc.php"(Uwaga : mysql.inc.php musi zawierać tylko to co jest na różowo bez żadnych znaków końca linii czy spacji)';
$lang['step1_err_copy'] = 'Skopiuj tekst zaznaczony na różowo pomiędzy cudzysłowiami i wklej do pliku "include/config_database.inc.php"(Uwaga : config_database.inc.php musi zawierać tylko to co jest na różowo bez żadnych znaków końca linii czy spacji)';
$lang['step1_host'] = 'MySQL host';
$lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';

View file

@ -34,7 +34,7 @@ $lang['perform a maintenance check'] = 'Jeżeli napotkasz jakiś problem wykonaj
$lang['deactivated plugins'] = 'W ramach zabezpieczenia zostąły deaktywowane następujące wtyczki. Przed ich ponowną aktywacją musisz sprawdzić dostępność aktualizacji dla nich:';
$lang['upgrade login message'] = 'Tylko administrator może wykonać aktualizację: zaloguj się poniżej.';
$lang['You do not have access rights to run upgrade'] = 'Nie masz uprawnień do wykonania aktualizacji';
$lang['in include/mysql.inc.php, before ?>, insert:'] = 'W pliku <i>include/mysql.inc.php</i>, przed <b>?></b>, wstaw:';
$lang['in include/config_database.inc.php, before ?>, insert:'] = 'W pliku <i>include/config_database.inc.php</i>, przed <b>?></b>, wstaw:';
// Upgrade informations from upgrade_1.3.1.php
$lang['all sub-categories of private categories become private'] = 'Wszystkie podkategorie kategorii prywatnych staną się prywatne';

View file

@ -34,9 +34,9 @@ mkdir $version
# cvs export -r $tag -d $version phpwebgallery
svn export http://piwigo.org/svn/tags/$tag $name
# creating mysql.inc.php empty and writeable
touch $name/include/mysql.inc.php
chmod a+w $name/include/mysql.inc.php
# creating config_database.inc.php empty and writeable
touch $name/include/config_database.inc.php
chmod a+w $name/include/config_database.inc.php
# find $name -name "*.php" \
# | xargs grep -l 'branch 1.7' \

View file

@ -24,7 +24,7 @@
define('PHPWG_ROOT_PATH', './');
// load config file
$config_file = PHPWG_ROOT_PATH.'include/mysql.inc.php';
$config_file = PHPWG_ROOT_PATH.'include/config_database.inc.php';
$config_file_contents = @file_get_contents($config_file);
if ($config_file_contents === false)
{
@ -40,7 +40,7 @@ include_once(PHPWG_ROOT_PATH.'include/functions.inc.php');
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
include_once(PHPWG_ROOT_PATH.'admin/include/functions_upgrade.php');
include(PHPWG_ROOT_PATH.'include/mysql.inc.php');
include(PHPWG_ROOT_PATH.'include/config_database.inc.php');
include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
@include(PHPWG_ROOT_PATH. 'include/config_local.inc.php');
@ -50,8 +50,8 @@ include_once(PHPWG_ROOT_PATH.'include/constants.php');
define('PREFIX_TABLE', $prefixeTable);
// Database connection
mysql_connect( $cfgHote, $cfgUser, $cfgPassword ) or die ( "Could not connect to database server" );
mysql_select_db( $cfgBase ) or die ( "Could not connect to database" );
mysql_connect( $conf['db_host'], $conf['db_user'], $conf['db_password'] ) or die ( "Could not connect to database server" );
mysql_select_db( $conf['db_base'] ) or die ( "Could not connect to database" );
if ( version_compare(mysql_get_server_info(), '4.1.0', '>=')
and defined('DB_CHARSET') and DB_CHARSET!='' )
{
@ -262,7 +262,7 @@ if (isset($_POST['submit']) and check_upgrade())
$conf['die_on_sql_error'] = false;
include($upgrade_file);
// Something to add in mysql.inc.php?
// Something to add in config_database.inc.php?
if (!empty($mysql_changes))
{
$config_file_contents =
@ -273,7 +273,7 @@ if (isset($_POST['submit']) and check_upgrade())
if (!@file_put_contents($config_file, $config_file_contents))
{
array_push($page['infos'],
l10n('in include/mysql.inc.php, before ?>, insert:') . '
l10n('in include/config_database.inc.php, before ?>, insert:') . '
<p><textarea rows="4" cols="40">'.implode("\r\n" , $mysql_changes).'</textarea></p>'
);
}

View file

@ -32,7 +32,7 @@ define('PHPWG_ROOT_PATH', './');
include_once(PHPWG_ROOT_PATH.'include/functions.inc.php');
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
include_once(PHPWG_ROOT_PATH.'admin/include/functions_upgrade.php');
include(PHPWG_ROOT_PATH.'include/mysql.inc.php');
include(PHPWG_ROOT_PATH.'include/config_database.inc.php');
include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
@include(PHPWG_ROOT_PATH. 'include/config_local.inc.php');
@ -54,8 +54,8 @@ define('UPGRADES_PATH', PHPWG_ROOT_PATH.'install/db');
// | Database connection |
// +-----------------------------------------------------------------------+
mysql_connect($cfgHote, $cfgUser, $cfgPassword) or die("Could not connect to database server");
mysql_select_db($cfgBase) or die("Could not connect to database");
mysql_connect($conf['db_host'], $conf['db_user'], $conf['db_password']) or die("Could not connect to database server");
mysql_select_db($conf['db_base']) or die("Could not connect to database");
if ( version_compare(mysql_get_server_info(), '4.1.0', '>=')
and defined('DB_CHARSET') and DB_CHARSET!='' )
{