Better randomizer chossen (rand() does only create 32767 different numbers under...
[mailer.git] / inc / modules / member / what-transfer.php
index 7e00b7a..2b61e4b 100644 (file)
@@ -181,7 +181,7 @@ case "new": // Start new transfer
                        }
 
                        // Generate tranafer id
-                       define('__TRANS_ID', bigintval(GEN_RANDOM_CODE("10", rand(0, 99999), $GLOBALS['userid'], $_POST['reason'])));
+                       define('__TRANS_ID', bigintval(GEN_RANDOM_CODE("10", mt_rand(0, 99999), $GLOBALS['userid'], $_POST['reason'])));
 
                        // Add entries to both tables
                        $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_transfers_in (userid, from_uid, points, reason, time_trans, trans_id) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')",
@@ -304,7 +304,7 @@ case "new": // Start new transfer
                // Generate Code
                if ($_CONFIG['transfer_code'] > 0)
                {
-                       $rand = rand(0, 99999);
+                       $rand = mt_rand(0, 99999);
                        $code = GEN_RANDOM_CODE($_CONFIG['transfer_code'], $rand, $GLOBALS['userid'], __TRANSFER_MAX_VALUE);
                        $img = GENERATE_IMAGE($code, false);
                        define('__TRANSFER_IMAGE_INPUT', "<INPUT type=\"hidden\" name=\"code_chk\" value=\"".$rand."\"><INPUT type=\"text\" name=\"code\" class=\"member_normal\" size=\"5\" maxlength=\"7\"".__TRANSFER_TO_DISABLED.">&nbsp;".$img);