* Kurzbeschreibung : Verbindet zu Ihrer Datenbank *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2013 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2016 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
'language',
'sql',
'expression',
+ 'encryption',
'filter',
'extensions') as $lib) {
setConfigEntry('OUTPUT_MODE', 'render');
} // END - if
- // CFG: DATABASE-TYPE
- setConfigEntry('_DB_TYPE', 'mysql');
+ // Debug message
+ /* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'isAjaxOutputMode()=' . intval(isAjaxOutputMode()) . ',isSessionVariableSet(database_extension)=' . intval(isSessionVariableSet('database_extension')));
+
+ // Is it AJAX call and database_extension is set?
+ if ((isAjaxOutputMode()) && (isSessionVariableSet('database_extension'))) {
+ // Then take it from session
+ /* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Setting _DB_TYPE from session;database_extension=' . getSession('database_extension'));
+ setConfigEntry('_DB_TYPE', getSession('database_extension'));
+ } elseif (isPhpExtensionLoaded('mysql')) {
+ // Debug message
+ /* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Setting _DB_TYPE to default (mysql) ...');
+
+ // Set (old) default
+ setConfigEntry('_DB_TYPE', 'mysql');
+ } elseif (isPhpExtensionLoaded('mysqli')) {
+ // Debug message
+ /* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Setting _DB_TYPE to MySQLi ...');
+
+ // Set (old) default
+ setConfigEntry('_DB_TYPE', 'mysqli');
+ } else {
+ // Opps, cannot detect it?
+ reportBug(__FILE__, __LINE__, 'Cannot detect mysql/mysqli. Please fix your setup.');
+ }
// Set link as down
unsetSqlLinkUp(__FILE__, __LINE__);
// Init message system
initMessages();
+ // Init session
+ initSession();
+
// Include more
- foreach (array('databases', 'session', 'install-functions', 'load_config', 'load_cache') as $inc) {
+ foreach (array('databases', 'install-functions', 'load_config', 'load_cache') as $inc) {
// Load include file
loadIncludeOnce('inc/' . $inc . '.php');
} // END - foreach