fixed errors in install.php mysql

This commit is contained in:
daniel 2017-03-13 13:32:05 +01:00
parent 43aaee9ae3
commit 5872cd1f49
1 changed files with 2 additions and 2 deletions

View File

@ -228,7 +228,7 @@ function parse_mysql_dump($url) {
$file_content = file($url); $file_content = file($url);
$query = ""; $query = "";
foreach($file_content as $sql_line) { foreach($file_content as $sql_line) {
if (trim($sql_line) != "" && strpos($sql_line, "--") === false) { if (trim($sql_line) != "" && strpos($sql_line, "-- ") === false) {
$query .= $sql_line; $query .= $sql_line;
if(preg_match("/;[\040]*\$/", $sql_line)) { if(preg_match("/;[\040]*\$/", $sql_line)) {
if (!$result = mysql_query($query)) { if (!$result = mysql_query($query)) {
@ -251,7 +251,7 @@ function parse_mysqli_dump($connection, $url) {
$file_content = file($url); $file_content = file($url);
$query = ""; $query = "";
foreach($file_content as $sql_line) { foreach($file_content as $sql_line) {
if (trim($sql_line) != "" && strpos($sql_line, "--") === false) { if (trim($sql_line) != "" && strpos($sql_line, "-- ") === false) {
$query .= $sql_line; $query .= $sql_line;
if(preg_match("/;[\040]*\$/", $sql_line)) { if(preg_match("/;[\040]*\$/", $sql_line)) {
if (!$result = mysqli_query($connection, $query)) { if (!$result = mysqli_query($connection, $query)) {