From 4ef8d2bbc2fe8d9c2d4a5938643149c5a2d7e19e Mon Sep 17 00:00:00 2001 From: Rafael White Date: Thu, 9 Jan 2020 17:09:44 -0400 Subject: [PATCH] Comment filtering of results --- src/Zoho/CRM/Request/Response.php | 42 +++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/Zoho/CRM/Request/Response.php b/src/Zoho/CRM/Request/Response.php index cfea7c4..8f26101 100755 --- a/src/Zoho/CRM/Request/Response.php +++ b/src/Zoho/CRM/Request/Response.php @@ -177,27 +177,27 @@ protected function parseResponseGetRecords() foreach ($dataElement as $key => $value) { $key = strpos($key, '_') ? str_replace('_', ' ', $key) : $key; - if (gettype($value) == 'array' && array_key_exists('id', $value)) { - if ($key == 'Owner') { - $key = 'Lead ' . $key; - $record['SMOWNERID'] = $value['id']; - $value = $value['name']; - } elseif ($key == 'Created By') { - $record['SMCREATORID'] = $value['id']; - $value = $value['name']; - } else { - $record[strtoupper(str_replace(' ', '', $key))] = $value['id']; - $value = $value['name']; - } - } - - if (gettype($value) == 'array' && empty($value)) { - $value = ''; - } - - if ($key == 'id') { - $key = 'LEADID'; - } + // if (gettype($value) == 'array' && array_key_exists('id', $value)) { + // if ($key == 'Owner') { + // $key = 'Lead ' . $key; + // $record['SMOWNERID'] = $value['id']; + // $value = $value['name']; + // } elseif ($key == 'Created By') { + // $record['SMCREATORID'] = $value['id']; + // $value = $value['name']; + // } else { + // $record[strtoupper(str_replace(' ', '', $key))] = $value['id']; + // $value = $value['name']; + // } + // } + + // if (gettype($value) == 'array' && empty($value)) { + // $value = ''; + // } + + // if ($key == 'id') { + // $key = 'LEADID'; + // } $record[$key] = $value; }