Changeset 4280 for trunk/include


Ignore:
Timestamp:
Nov 16, 2009, 8:17:01 PM (14 years ago)
Author:
nikrou
Message:

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.

Location:
trunk/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/common.inc.php

    r4047 r4280  
    7171$filter = array();
    7272
    73 @include(PHPWG_ROOT_PATH .'include/mysql.inc.php');
     73@include(PHPWG_ROOT_PATH .'include/config_database.inc.php');
    7474if (!defined('PHPWG_INSTALLED'))
    7575{
     
    105105
    106106// Database connection
    107 @mysql_connect( $cfgHote, $cfgUser, $cfgPassword ) or my_error( 'mysql_connect', true );
    108 @mysql_select_db( $cfgBase ) or my_error( 'mysql_select_db', true );
     107@mysql_connect( $conf['db_host'], $conf['db_user'], $conf['db_password'] ) or my_error( 'mysql_connect', true );
     108@mysql_select_db( $conf['db_base'] ) or my_error( 'mysql_select_db', true );
    109109
    110110defined('PWG_CHARSET') and defined('DB_CHARSET')
  • trunk/include/config_default.inc.php

    r3938 r4280  
    495495// All informations contained in these tables and column are related to
    496496// piwigo_users table.
    497 $conf['users_table'] = $prefixeTable.'users';
     497//
     498// You can use a different table for users, if you define associated constant
     499// default configuration :
     500// define('USERS_TABLE', $prefixeTable.'users');
    498501
    499502// Other tables can be changed, if you define associated constants
  • trunk/include/constants.php

    r3282 r4280  
    6969  define('USER_GROUP_TABLE', $prefixeTable.'user_group');
    7070if (!defined('USERS_TABLE'))
    71   define('USERS_TABLE', $conf['users_table']);
     71  define('USERS_TABLE', $prefixeTable.'users');
    7272if (!defined('USER_INFOS_TABLE'))
    7373  define('USER_INFOS_TABLE', $prefixeTable.'user_infos');
Note: See TracChangeset for help on using the changeset viewer.