mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
fixed errors php7 mysqli and warning include
Former-commit-id: 68bdf4c26530de45efe2dd8fab360fb88c8976bc
This commit is contained in:
parent
dc2b738776
commit
2c208b5e29
@ -1233,7 +1233,6 @@ function mysql_db_process_file ($path, $handle_error = true) {
|
||||
|
||||
foreach ($file_content as $sql_line) {
|
||||
if (trim($sql_line) != "" && strpos($sql_line, "--") === false) {
|
||||
|
||||
$query .= $sql_line;
|
||||
|
||||
if (preg_match("/;[\040]*\$/", $sql_line)) {
|
||||
@ -1247,7 +1246,12 @@ function mysql_db_process_file ($path, $handle_error = true) {
|
||||
// Error. Rollback the transaction
|
||||
mysql_db_process_sql_rollback();
|
||||
|
||||
$error_message = mysql_error();
|
||||
if($config["mysqli"]){
|
||||
$error_message = mysqli_error($config['dbconnection']);
|
||||
}
|
||||
else{
|
||||
$error_message = mysql_error();
|
||||
}
|
||||
|
||||
// Handle the error
|
||||
if ($handle_error) {
|
||||
@ -1273,7 +1277,6 @@ function mysql_db_process_file ($path, $handle_error = true) {
|
||||
|
||||
// No errors. Commit the transaction
|
||||
mysql_db_process_sql_commit();
|
||||
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
@ -32,7 +32,7 @@ include_once($config['homedir'] . "/include/functions_servers.php");
|
||||
include_once($config['homedir'] . "/include/functions_planned_downtimes.php");
|
||||
include_once($config['homedir'] . "/include/functions_db.php");
|
||||
include_once($config['homedir'] . "/include/functions_event_responses.php");
|
||||
include_once($config['homedir'] . "/include/functions_policies.php");
|
||||
enterprise_include_once ('include/functions_policies.php');
|
||||
enterprise_include_once ('include/functions_local_components.php');
|
||||
enterprise_include_once ('include/functions_events.php');
|
||||
enterprise_include_once ('include/functions_agents.php');
|
||||
|
Loading…
x
Reference in New Issue
Block a user