mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
fixed error in function check mr
This commit is contained in:
parent
4d5a129ec4
commit
48e68b1264
@ -1329,12 +1329,14 @@ function db_run_sql_file ($location) {
|
||||
foreach ($lines as $line) {
|
||||
$line = trim($line);
|
||||
if ($line && !preg_match('/^--/', $line) && !preg_match('/^\/\*/', $line)) {
|
||||
|
||||
$line = preg_replace('/;$/',"__;__", $line);
|
||||
$commands .= $line;
|
||||
}
|
||||
}
|
||||
|
||||
// Convert to array
|
||||
$commands = explode(";", $commands);
|
||||
$commands = explode("__;__", $commands);
|
||||
|
||||
if ($config['mysqli']) {
|
||||
$mysqli = new mysqli($config["dbhost"], $config["dbuser"], $config["dbpass"], $config["dbname"], $config["dbport"]);
|
||||
@ -1350,6 +1352,8 @@ function db_run_sql_file ($location) {
|
||||
|
||||
foreach ($commands as $command) {
|
||||
if (trim($command)) {
|
||||
$command .= ";";
|
||||
|
||||
if ($config['mysqli']) {
|
||||
$result = $mysqli->query($command);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user