494 $admin_user = $_POST['admin_user']; |
494 $admin_user = $_POST['admin_user']; |
495 $admin_user = str_replace('_', ' ', $admin_user); |
495 $admin_user = str_replace('_', ' ', $admin_user); |
496 $admin_user = $db->escape($admin_user); |
496 $admin_user = $db->escape($admin_user); |
497 |
497 |
498 $schema = file_get_contents('schema.sql'); |
498 $schema = file_get_contents('schema.sql'); |
|
499 // convert \r\n in the schema to \n, in case some FTP client or zip utility ran unix2dos for us |
|
500 // thanks to InvisGhost for reporting this error |
|
501 $schema = str_replace("\r\n", "\n", $schema); |
|
502 |
499 $schema = str_replace('{{SITE_NAME}}', $db->escape($_POST['sitename'] ), $schema); |
503 $schema = str_replace('{{SITE_NAME}}', $db->escape($_POST['sitename'] ), $schema); |
500 $schema = str_replace('{{SITE_DESC}}', $db->escape($_POST['sitedesc'] ), $schema); |
504 $schema = str_replace('{{SITE_DESC}}', $db->escape($_POST['sitedesc'] ), $schema); |
501 $schema = str_replace('{{COPYRIGHT}}', $db->escape($_POST['copyright'] ), $schema); |
505 $schema = str_replace('{{COPYRIGHT}}', $db->escape($_POST['copyright'] ), $schema); |
502 $schema = str_replace('{{ADMIN_USER}}', $admin_user , $schema); |
506 $schema = str_replace('{{ADMIN_USER}}', $admin_user , $schema); |
503 $schema = str_replace('{{ADMIN_PASS}}', $db->escape($admin_pass ), $schema); |
507 $schema = str_replace('{{ADMIN_PASS}}', $db->escape($admin_pass ), $schema); |