2 // MediaWiki database connection setup for atutor_mediawiki integration module
3 require('mw_config.php');
6 if (AT_INCLUDE_PATH !== 'NULL') {
7 $db_mw= @mysql_connect(MW_DB_HOST.':'.MW_DB_PORT, MW_DB_USER, MW_DB_PWD);
10 /* AT_ERROR_NO_DB_CONNECT */
11 require_once(AT_INCLUDE_PATH . 'classes/ErrorHandler/ErrorHandler.class.php');
12 $err = new ErrorHandler();
13 trigger_error('VITAL#Unable to connect to db. Set database information in the module\'s mw_config.php file.', E_USER_ERROR);
16 if (!@mysql_select_db(MW_DB_NAME, $db_mw)) {
17 require_once(AT_INCLUDE_PATH . 'classes/ErrorHandler/ErrorHandler.class.php');
18 $err = new ErrorHandler();
19 trigger_error('VITAL#DB connection established, but database "'.MW_DB_NAME.'" cannot be selected.',