aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xinstall/index.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/install/index.php b/install/index.php
index 7a6eaf3a..fc16af0c 100755
--- a/install/index.php
+++ b/install/index.php
@@ -92,6 +92,8 @@ else if (isset($_POST['install'])) {
92 if ($_POST['mysql_server'] != "") {$server = $_POST['mysql_server'];} // if server and database are filled 92 if ($_POST['mysql_server'] != "") {$server = $_POST['mysql_server'];} // if server and database are filled
93 if ($_POST['mysql_database'] != "") {$database = $_POST['mysql_database'];} 93 if ($_POST['mysql_database'] != "") {$database = $_POST['mysql_database'];}
94 94
95 $sql_structure = file_get_contents('install/mysql.sql');
96
95 if (isset($_POST['mysql_utf8_mb4'])) { 97 if (isset($_POST['mysql_utf8_mb4'])) {
96 //with UTF8-MB4 98 //with UTF8-MB4
97 $db_path = 'mysql:host=' . $server . ';dbname=' . $database . ';charset=utf8mb4'; 99 $db_path = 'mysql:host=' . $server . ';dbname=' . $database . ';charset=utf8mb4';
@@ -100,7 +102,7 @@ else if (isset($_POST['install'])) {
100 )); 102 ));
101 $content = str_replace("define ('MYSQL_USE_UTF8MB4', FALSE);", "define ('MYSQL_USE_UTF8MB4', TRUE);", $content); 103 $content = str_replace("define ('MYSQL_USE_UTF8MB4', FALSE);", "define ('MYSQL_USE_UTF8MB4', TRUE);", $content);
102 } else { // regular UTF8 104 } else { // regular UTF8
103 $content = str_replace(" DEFAULT CHARSET=utf8mb4", "", $content); // replace the UTF8-MB4 occurences inside the mysql.sql file 105 $sql_structure = str_replace(" DEFAULT CHARSET=utf8mb4", "", $sql_structure); // replace the UTF8-MB4 occurences inside the mysql.sql file
104 $db_path = 'mysql:host=' . $server . ';dbname=' . $database; 106 $db_path = 'mysql:host=' . $server . ';dbname=' . $database;
105 $handle = new PDO($db_path, $_POST['mysql_user'], $_POST['mysql_password']); 107 $handle = new PDO($db_path, $_POST['mysql_user'], $_POST['mysql_password']);
106 } 108 }