From 9204315d8e315fa90bf9ddab5119981e175ef482 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sat, 30 Nov 2024 03:01:20 -0500 Subject: [PATCH] raw data --- .../app/Controllers/WrenchUserContacts.php | 29 +++++-------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/www-api/app/Controllers/WrenchUserContacts.php b/www-api/app/Controllers/WrenchUserContacts.php index 4dd8cfc4..15ca8bca 100644 --- a/www-api/app/Controllers/WrenchUserContacts.php +++ b/www-api/app/Controllers/WrenchUserContacts.php @@ -39,37 +39,22 @@ class WrenchUserContacts extends BaseController $member_uid = str_replace("-", "_", $in["uid"]); $time_to_save = false; $endpoint = "CONTACTS_IMPORT_ACTION-". $member_uid; + $outC = $this->getCache($endpoint); // try find in cache - // $outC = $this->getCache($endpoint); // try find in cache - if ( $in["mmode"] == 0 ){ - $in["raw_contacts_0"] = $in["raw_contacts"]; // extra store raw + if (isset($outC) && is_array($outC)){ + $outC["raw_contacts_". $in["mmode"]] = $in["raw_contacts"]; // extra store raw $this->deleteCache($endpoint); - $this->saveCache($endpoint,$in,5300); - // log_message('critical', "************* WrenchUserContacts MODE =0 0001 ".serialize($in)); - $mmm =$in["mmode"]; - log_message('critical', "************* WrenchUserContacts MODE = $mmm 0001 ".serialize($in["raw_contacts"])); + $this->saveCache($endpoint,$outC,5300); } else { - $outC = $this->getCache($endpoint); // try find in cache + // $this->deleteCache($endpoint); $outC["raw_contacts_". $in["mmode"]] = $in["raw_contacts"]; // extra store raw - $outC["raw_contacts"] =$outC["raw_contacts"].$in["raw_contacts"]; // expand raw contents -$mmm =$in["mmode"]; - // log_message('critical', "************* WrenchUserContacts MODE = $mmm 0002 ".serialize($in)); - log_message('critical', "************* WrenchUserContacts MODE = $mmm 0002 ".serialize($in["raw_contacts"])); - $this->deleteCache($endpoint); $this->saveCache($endpoint,$outC,5300); - - /* - Determine if this is the last - Fire process events - save to the backend database; - */ -// if ($in["csize"] + $in["mmode"] >= $in["pcount"]){ -// $time_to_save = true; -// } } + + if ($in["csize"] + $in["mmode"] >= $in["pcount"]){ $time_to_save = true; }