Update database.php
This commit is contained in:
parent
f1161d2744
commit
538f189285
|
@ -292,6 +292,9 @@ if(!check_function_exists("get_bind_to_sql_insert")) {
|
||||||
// get not duplicatable fieldnames
|
// get not duplicatable fieldnames
|
||||||
$setkeys = get_array(get_value_in_array("setkeys", $options, false));
|
$setkeys = get_array(get_value_in_array("setkeys", $options, false));
|
||||||
$setignores = get_array(get_value_in_array("setignores", $options, false));
|
$setignores = get_array(get_value_in_array("setignores", $options, false));
|
||||||
|
|
||||||
|
// safemode_off (default: false)
|
||||||
|
$safemode_off = array_key_equals("safemode_off", $options, true);
|
||||||
|
|
||||||
// set variables
|
// set variables
|
||||||
$num_duplicates = 0;
|
$num_duplicates = 0;
|
||||||
|
@ -316,6 +319,9 @@ if(!check_function_exists("get_bind_to_sql_insert")) {
|
||||||
foreach($_rows as $_row) {
|
foreach($_rows as $_row) {
|
||||||
$num_duplicates += intval($_row['value']);
|
$num_duplicates += intval($_row['value']);
|
||||||
}
|
}
|
||||||
|
} elseif($safemode_off !== true) {
|
||||||
|
write_common_log("Blocked this SQL because it is maybe accidentally query. If you want continue, set safemode_off option to true", "system/database");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check ignores
|
// check ignores
|
||||||
|
|
Loading…
Reference in New Issue
Block a user