aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/common.inc.php6
-rw-r--r--include/config_default.inc.php5
-rw-r--r--include/constants.php2
3 files changed, 8 insertions, 5 deletions
diff --git a/include/common.inc.php b/include/common.inc.php
index 29bc6b29b..a0ec209ef 100644
--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -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');
diff --git a/include/config_default.inc.php b/include/config_default.inc.php
index a9ef63607..94fcdbb55 100644
--- a/include/config_default.inc.php
+++ b/include/config_default.inc.php
@@ -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:
diff --git a/include/constants.php b/include/constants.php
index 7e429a91c..9c29f0c91 100644
--- a/include/constants.php
+++ b/include/constants.php
@@ -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'))