Commit 638bf4f8 authored by Walid Nouh's avatar Walid Nouh
Browse files

[0.72] improve values checks in the cache to avoid duplicates (in case of multithreaded ocs import)

parent cc4d26c2
...@@ -2362,7 +2362,7 @@ class RuleCachedCollection extends RuleCollection{ ...@@ -2362,7 +2362,7 @@ class RuleCachedCollection extends RuleCollection{
if ($res_check = $DB->query($sql)){ if ($res_check = $DB->query($sql)){
$output_values=array(); $output_values=array();
if ($DB->numrows($res_check) == 1){ if ($DB->numrows($res_check) > 0){
$data=$DB->fetch_assoc($res_check); $data=$DB->fetch_assoc($res_check);
foreach ($this->cache_params["output_value"] as $param => $param_value){ foreach ($this->cache_params["output_value"] as $param => $param_value){
if (isset($data[$param_value])){ if (isset($data[$param_value])){
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment