install.php
changeset 306 7a7173c0f62f
parent 294 444c34a3886b
child 310 78cb09a23e69
--- a/install.php	Fri Aug 22 01:05:42 2008 -0400
+++ b/install.php	Wed Sep 10 06:57:54 2008 -0400
@@ -496,6 +496,10 @@
   $admin_user = $db->escape($admin_user);
   
   $schema = file_get_contents('schema.sql');
+  // convert \r\n in the schema to \n, in case some FTP client or zip utility ran unix2dos for us
+  // thanks to InvisGhost for reporting this error
+  $schema = str_replace("\r\n", "\n", $schema);
+  
   $schema = str_replace('{{SITE_NAME}}',    $db->escape($_POST['sitename']   ), $schema);
   $schema = str_replace('{{SITE_DESC}}',    $db->escape($_POST['sitedesc']   ), $schema);
   $schema = str_replace('{{COPYRIGHT}}',    $db->escape($_POST['copyright']  ), $schema);