Fixed an error on oracle
This commit is contained in:
parent
35623b06bf
commit
745445d6d4
|
@ -1681,7 +1681,7 @@ function agents_delete_agent ($id_agents, $disableACL = false) {
|
|||
|
||||
//Alert
|
||||
db_process_delete_temp ("talert_template_modules",
|
||||
"id_agent_module", $where_modules);
|
||||
"id_agent_module", $where_modules, true);
|
||||
|
||||
//Events (up/down monitors)
|
||||
// Dont delete here, could be very time-exausting, let the daily script
|
||||
|
@ -1690,11 +1690,11 @@ function agents_delete_agent ($id_agents, $disableACL = false) {
|
|||
|
||||
//Graphs, layouts, reports & networkmapenterprise
|
||||
db_process_delete_temp ("tgraph_source",
|
||||
"id_agent_module", $where_modules);
|
||||
"id_agent_module", $where_modules, true);
|
||||
db_process_delete_temp ("tlayout_data",
|
||||
"id_agente_modulo", $where_modules);
|
||||
"id_agente_modulo", $where_modules, true);
|
||||
db_process_delete_temp ("treport_content",
|
||||
"id_agent_module", $where_modules);
|
||||
"id_agent_module", $where_modules, true);
|
||||
if (enterprise_installed()) {
|
||||
$nodes = db_get_all_rows_filter(
|
||||
"tnetworkmap_enterprise_nodes",
|
||||
|
@ -1743,7 +1743,7 @@ function agents_delete_agent ($id_agents, $disableACL = false) {
|
|||
|
||||
// tagente_datos_inc
|
||||
// Dont delete here, this records are deleted later, in database script
|
||||
// db_process_delete_temp ("tagente_datos_inc", "id_agente_modulo", $where_modules);
|
||||
// db_process_delete_temp ("tagente_datos_inc", "id_agente_modulo", $where_modules, true);
|
||||
|
||||
// Delete remote configuration
|
||||
if (enterprise_installed()) {
|
||||
|
|
|
@ -848,10 +848,11 @@ function db_format_array_where_clause_sql ($values, $join = 'AND', $prefix = fal
|
|||
* @param string Table name
|
||||
* @param string Field of the filter condition
|
||||
* @param string Value of the filter
|
||||
* @param bool The value will be appended without quotes
|
||||
*
|
||||
* @result Rows deleted or false if something goes wrong
|
||||
*/
|
||||
function db_process_delete_temp ($table, $row, $value) {
|
||||
function db_process_delete_temp ($table, $row, $value, $custom_value = false) {
|
||||
global $error; //Globalize the errors variable
|
||||
global $config;
|
||||
|
||||
|
@ -861,8 +862,8 @@ function db_process_delete_temp ($table, $row, $value) {
|
|||
$result = db_process_sql_delete ($table, $row.' = '.$value);
|
||||
break;
|
||||
case "oracle":
|
||||
if (is_int ($value) || is_bool ($value) ||
|
||||
is_float ($value) || is_double ($value)) {
|
||||
if ($custom_value || is_int ($value) || is_bool ($value) ||
|
||||
is_float ($value) || is_double ($value)) {
|
||||
$result = oracle_db_process_sql_delete_temp ($table, $row . ' = ' . $value);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue