mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
some fixes
This commit is contained in:
parent
5b06415235
commit
6d469912fa
@ -1339,7 +1339,7 @@ function mysql_db_process_file($path, $handle_error=true)
|
|||||||
$query = '';
|
$query = '';
|
||||||
|
|
||||||
// Begin the transaction
|
// Begin the transaction
|
||||||
mysql_db_process_sql_begin();
|
db_process_sql_begin();
|
||||||
|
|
||||||
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) {
|
||||||
@ -1354,7 +1354,7 @@ function mysql_db_process_file($path, $handle_error=true)
|
|||||||
|
|
||||||
if (!$result = $query_result) {
|
if (!$result = $query_result) {
|
||||||
// Error. Rollback the transaction
|
// Error. Rollback the transaction
|
||||||
mysql_db_process_sql_rollback();
|
db_process_sql_rollback();
|
||||||
|
|
||||||
if ($config['mysqli']) {
|
if ($config['mysqli']) {
|
||||||
$error_message = mysqli_error($config['dbconnection']);
|
$error_message = mysqli_error($config['dbconnection']);
|
||||||
@ -1391,7 +1391,7 @@ function mysql_db_process_file($path, $handle_error=true)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// No errors. Commit the transaction
|
// No errors. Commit the transaction
|
||||||
mysql_db_process_sql_commit();
|
db_process_sql_commit();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@ -1430,7 +1430,7 @@ function db_run_sql_file($location)
|
|||||||
$mysqli->query($config['dbconnection'], 'START TRANSACTION');
|
$mysqli->query($config['dbconnection'], 'START TRANSACTION');
|
||||||
} else {
|
} else {
|
||||||
// Run commands
|
// Run commands
|
||||||
mysql_db_process_sql_begin();
|
db_process_sql_begin();
|
||||||
// Begin transaction
|
// Begin transaction
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1456,7 +1456,7 @@ function db_run_sql_file($location)
|
|||||||
$mysqli->query($config['dbconnection'], 'COMMIT');
|
$mysqli->query($config['dbconnection'], 'COMMIT');
|
||||||
$mysqli->query($config['dbconnection'], 'SET AUTOCOMMIT = 1');
|
$mysqli->query($config['dbconnection'], 'SET AUTOCOMMIT = 1');
|
||||||
} else {
|
} else {
|
||||||
mysql_db_process_sql_commit();
|
db_process_sql_commit();
|
||||||
// Save results
|
// Save results
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1466,7 +1466,7 @@ function db_run_sql_file($location)
|
|||||||
$mysqli->query($config['dbconnection'], 'ROLLBACK ');
|
$mysqli->query($config['dbconnection'], 'ROLLBACK ');
|
||||||
$mysqli->query($config['dbconnection'], 'SET AUTOCOMMIT = 1');
|
$mysqli->query($config['dbconnection'], 'SET AUTOCOMMIT = 1');
|
||||||
} else {
|
} else {
|
||||||
mysql_db_process_sql_rollback();
|
db_process_sql_rollback();
|
||||||
// Undo results
|
// Undo results
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user