require($INC);
}
-// Non-database functions
-require('inc/functions.php');
-
-// Wrapper functions
-require('inc/wrapper-functions.php');
-
// Load more function libraries or includes
-foreach (array('request-functions', 'session-functions', 'config-functions', 'code-functions', 'inc-functions', 'language-functions', 'filters', 'mysql-manager', 'extensions', 'db/lib', 'handler', 'hooks') as $lib) {
+foreach (array('functions', 'request-functions', 'session-functions', 'code-functions', 'inc-functions', 'language-functions', 'filters', 'mysql-manager', 'extensions', 'handler', 'hooks') as $lib) {
// Load special functions
loadIncludeOnce('inc/' . $lib . '.php');
} // END - foreach
// Load configuration file(s) here
loadIncludeOnce('inc/load_config.php');
+ // Load database layer here
+ loadIncludeOnce('inc/db/lib.php');
+
// Check for write-permission for config.php and inc directory
if (!isModuleSet()) setModule(REQUEST_GET('module'));
if (!isModuleSet()) setModule('index');
// Is the extension sql_patches installed and at least 0.3.6?
if (GET_EXT_VERSION('sql_patches') >= '0.3.6') {
// Generate random number
- define('RAND_NUMBER', generateRandomCode(10, mt_rand(10000, 32766), getUserId(), ''));
+ setConfigEntry('RAND_NUMBER', generateRandomCode(10, mt_rand(10000, 32766), getUserId(), ''));
} else {
// Generate weak (!!!) code
- define('RAND_NUMBER', mt_rand(1000000, 9999999));
+ setConfigEntry('RAND_NUMBER', mt_rand(1000000, 9999999));
}
} else {
// Wrong database?