require(JIRAFEAU_ROOT . 'lib/lang.php');
if ($cfg['download_password_requirement'] === "generated"){
- $download_pass = jirafeau_gen_download_pass();
+ $download_pass = jirafeau_gen_download_pass($cfg['download_password_gen_len'], $cfg['download_password_gen_chars']);
}
check_errors($cfg);
return $code;
}
-function jirafeau_gen_download_pass()
+function jirafeau_gen_download_pass($length, $allowed_chars)
{
- $length = $cfg['download_password_gen_len'];
- $allowed_chars = $cfg['download_password_gen_chars'];
if ($length <= 0) {
return false;
}