define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "386");
+define('CURR_SVN_REVISION', "387");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
// Shall we activate the exchange?
if ($_CONFIG['activate_xchange'] > 0) activateExchange();
- // Generate random number
- if (isset($GLOBALS['userid'])) {
- define('RAND_NUMBER', GEN_RANDOM_CODE(10, mt_rand(10000,32766), $GLOBALS['userid'], ""));
+ // Is the extension sql_patches installed and at least 0.3.6?
+ if (GET_EXT_VERSION("sql_patches") >= "0.3.6") {
+ // Generate random number
+ if (isset($GLOBALS['userid'])) {
+ define('RAND_NUMBER', GEN_RANDOM_CODE(10, mt_rand(10000,32766), $GLOBALS['userid'], ""));
+ } else {
+ define('RAND_NUMBER', GEN_RANDOM_CODE(10, mt_rand(10000,32766), 0, ""));
+ }
} else {
- define('RAND_NUMBER', GEN_RANDOM_CODE(10, mt_rand(10000,32766), 0, ""));
+ // Generate weak (!!!) code
+ define('RAND_NUMBER', mt_rand(1000000, 9999999));
}
} else {
// Wrong database?