| 1 |
<?php |
| 2 |
|
| 3 |
namespace BitCode\BitForm\Core\Integration; |
| 4 |
|
| 5 |
use BitCode\BitForm\Admin\Form\AdminFormManager; |
| 6 |
use BitCode\BitForm\Admin\Form\Helpers; |
| 7 |
use BitCode\BitForm\Core\Database\FormEntryLogModel; |
| 8 |
use BitCode\BitForm\Core\Database\FormEntryModel; |
| 9 |
use BitCode\BitForm\Core\Database\IntegrationModel; |
| 10 |
use BitCode\BitForm\Core\Util\FieldValueHandler; |
| 11 |
use BitCode\BitForm\Core\Util\MailNotifier; |
| 12 |
use BitCode\BitForm\Frontend\Form\FrontendFormManager; |
| 13 |
|
| 14 |
final class IntegrationHandler |
| 15 |
{ |
| 16 |
private static $_formID; |
| 17 |
private static $_integrationModel; |
| 18 |
private $_user_details; |
| 19 |
|
| 20 |
/** |
| 21 |
* Constructor of Integration Handler |
| 22 |
* |
| 23 |
* @param Integer $formID If Integration is accessible globally then |
| 24 |
* $formID will be 0 and category app |
| 25 |
* @param Array $user_details Details of user accessing data |
| 26 |
* @return void |
| 27 |
*/ |
| 28 |
public function __construct($formID, $user_details = null) |
| 29 |
{ |
| 30 |
static::$_formID = $formID; |
| 31 |
static::$_integrationModel = new IntegrationModel(); |
| 32 |
$this->_user_details = $user_details; |
| 33 |
} |
| 34 |
|
| 35 |
public function getAIntegration($integrationID, $integrationCategory = null, $integrationType = null) |
| 36 |
{ |
| 37 |
$conditions = [ |
| 38 |
'form_id' => static::$_formID, |
| 39 |
'id' => $integrationID, |
| 40 |
]; |
| 41 |
if (!is_null($integrationType)) { |
| 42 |
$conditions = array_merge($conditions, ['integration_type' => $integrationType]); |
| 43 |
} |
| 44 |
if (!is_null($integrationCategory)) { |
| 45 |
$conditions = array_merge($conditions, ['category' => $integrationCategory]); |
| 46 |
} |
| 47 |
return static::$_integrationModel->get( |
| 48 |
[ |
| 49 |
'id', |
| 50 |
'integration_name', |
| 51 |
'integration_type', |
| 52 |
'integration_details', |
| 53 |
'form_id', |
| 54 |
], |
| 55 |
$conditions |
| 56 |
); |
| 57 |
} |
| 58 |
|
| 59 |
public function getAllIntegration($integrationCategory = null, $integrationType = null, $status = null, $id = null) |
| 60 |
{ |
| 61 |
$conditions = [ |
| 62 |
'form_id' => static::$_formID, |
| 63 |
]; |
| 64 |
if (!is_null($integrationType)) { |
| 65 |
$conditions = array_merge($conditions, ['integration_type' => $integrationType]); |
| 66 |
} |
| 67 |
|
| 68 |
if (!is_null($integrationCategory)) { |
| 69 |
$conditions = array_merge($conditions, ['category' => $integrationCategory]); |
| 70 |
} |
| 71 |
if (!is_null($status)) { |
| 72 |
$conditions = array_merge($conditions, ['status' => 1]); |
| 73 |
} |
| 74 |
if (!is_null($id)) { |
| 75 |
$conditions = array_merge($conditions, ['id' => $id]); |
| 76 |
} |
| 77 |
return static::$_integrationModel->get( |
| 78 |
[ |
| 79 |
'id', |
| 80 |
'form_id', |
| 81 |
'integration_name', |
| 82 |
'integration_type', |
| 83 |
'integration_details', |
| 84 |
'status', |
| 85 |
], |
| 86 |
$conditions |
| 87 |
); |
| 88 |
} |
| 89 |
|
| 90 |
public function getIntegrationWithoutFormId($integrationCategory = null, $integrationType = null, $status = null, $id = null) |
| 91 |
{ |
| 92 |
$conditions = []; |
| 93 |
if (!is_null($integrationType)) { |
| 94 |
$conditions = array_merge($conditions, ['integration_type' => $integrationType]); |
| 95 |
} |
| 96 |
|
| 97 |
if (!is_null($integrationCategory)) { |
| 98 |
$conditions = array_merge($conditions, ['category' => $integrationCategory]); |
| 99 |
} |
| 100 |
if (!is_null($status)) { |
| 101 |
$conditions = array_merge($conditions, ['status' => 1]); |
| 102 |
} |
| 103 |
if (!is_null($id)) { |
| 104 |
$conditions = array_merge($conditions, ['id' => $id]); |
| 105 |
} |
| 106 |
return static::$_integrationModel->get( |
| 107 |
[ |
| 108 |
'id', |
| 109 |
'form_id', |
| 110 |
'integration_name', |
| 111 |
'integration_type', |
| 112 |
'integration_details', |
| 113 |
'status', |
| 114 |
], |
| 115 |
$conditions |
| 116 |
); |
| 117 |
} |
| 118 |
|
| 119 |
public function saveIntegration($integrationName, $integrationType, $integrationDetails, $integrationCategory, $status = null) |
| 120 |
{ |
| 121 |
if (null === $status) { |
| 122 |
$status = 1; |
| 123 |
} |
| 124 |
return static::$_integrationModel->insert( |
| 125 |
[ |
| 126 |
'integration_name' => $integrationName, |
| 127 |
'integration_type' => $integrationType, |
| 128 |
'integration_details' => $integrationDetails, |
| 129 |
'category' => $integrationCategory, |
| 130 |
'form_id' => static::$_formID, |
| 131 |
'user_id' => $this->_user_details['id'], |
| 132 |
'user_ip' => $this->_user_details['ip'], |
| 133 |
'status' => $status, |
| 134 |
'created_at' => $this->_user_details['time'], |
| 135 |
'updated_at' => $this->_user_details['time'], |
| 136 |
] |
| 137 |
); |
| 138 |
} |
| 139 |
|
| 140 |
public function updateIntegration($integrationID, $integrationName, $integrationType, $integrationDetails, $integrationCategory, $status = null) |
| 141 |
{ |
| 142 |
if (null === $status) { |
| 143 |
$status = 1; |
| 144 |
} |
| 145 |
return static::$_integrationModel->update( |
| 146 |
[ |
| 147 |
'integration_name' => $integrationName, |
| 148 |
'integration_type' => $integrationType, |
| 149 |
'integration_details' => $integrationDetails, |
| 150 |
'category' => $integrationCategory, |
| 151 |
'form_id' => static::$_formID, |
| 152 |
'user_id' => $this->_user_details['id'], |
| 153 |
'user_ip' => $this->_user_details['ip'], |
| 154 |
'status' => $status, |
| 155 |
'updated_at' => $this->_user_details['time'], |
| 156 |
], |
| 157 |
[ |
| 158 |
'id' => $integrationID, |
| 159 |
] |
| 160 |
); |
| 161 |
} |
| 162 |
|
| 163 |
public function duplicateAllInAForm($oldFormId) |
| 164 |
{ |
| 165 |
$integCols = ['integration_name', 'integration_type', 'integration_details', 'category', 'form_id', 'user_id', 'user_ip', 'status', 'created_at', 'updated_at']; |
| 166 |
$integDupData = [ |
| 167 |
'integration_name', |
| 168 |
'integration_type', |
| 169 |
'integration_details', |
| 170 |
'category', |
| 171 |
static::$_formID, |
| 172 |
$this->_user_details['id'], |
| 173 |
$this->_user_details['ip'], |
| 174 |
'status', |
| 175 |
$this->_user_details['time'], |
| 176 |
$this->_user_details['time'], |
| 177 |
]; |
| 178 |
return static::$_integrationModel->duplicate($integCols, $integDupData, ['form_id' => $oldFormId]); |
| 179 |
} |
| 180 |
|
| 181 |
public function deleteIntegration($integrationID) |
| 182 |
{ |
| 183 |
return static::$_integrationModel->delete( |
| 184 |
[ |
| 185 |
'id' => $integrationID, |
| 186 |
'form_id' => static::$_formID, |
| 187 |
] |
| 188 |
); |
| 189 |
} |
| 190 |
|
| 191 |
public static function replaceFieldWithValue($dataToReplaceField, $fieldValues) |
| 192 |
{ |
| 193 |
if (empty($dataToReplaceField)) { |
| 194 |
return false; |
| 195 |
} |
| 196 |
if (is_string($dataToReplaceField)) { |
| 197 |
$dataToReplaceField = static::replaceFieldWithValueHelper($dataToReplaceField, $fieldValues); |
| 198 |
} elseif (is_array($dataToReplaceField)) { |
| 199 |
foreach ($dataToReplaceField as $field => $value) { |
| 200 |
if (is_array($value) && 1 === count($value)) { |
| 201 |
$dataToReplaceField[$field] = static::replaceFieldWithValueHelper($value[0], $fieldValues); |
| 202 |
} elseif (is_array($value)) { |
| 203 |
$dataToReplaceField[$field] = static::replaceFieldWithValue($value, $fieldValues); |
| 204 |
} else { |
| 205 |
$dataToReplaceField[$field] = static::replaceFieldWithValueHelper($value, $fieldValues); |
| 206 |
} |
| 207 |
} |
| 208 |
} |
| 209 |
return $dataToReplaceField; |
| 210 |
} |
| 211 |
|
| 212 |
private static function replaceFieldWithValueHelper($stringToReplaceField, $fieldValues) |
| 213 |
{ |
| 214 |
if (empty($stringToReplaceField)) { |
| 215 |
return $stringToReplaceField; |
| 216 |
} |
| 217 |
$fieldPattern = '/\${\w[^ ${}]*}/'; |
| 218 |
preg_match_all($fieldPattern, $stringToReplaceField, $matchedField); |
| 219 |
$uniqueFieldsInStr = array_unique($matchedField[0]); |
| 220 |
|
| 221 |
foreach ($uniqueFieldsInStr as $value) { |
| 222 |
$fieldName = substr($value, 2, strlen($value) - 3); |
| 223 |
|
| 224 |
$repeaterArr = explode('.', $fieldName); |
| 225 |
if (isset($fieldValues[$fieldName])) { |
| 226 |
$stringToReplaceField = is_string($fieldValues[$fieldName]) |
| 227 |
? str_replace($value, $fieldValues[$fieldName], $stringToReplaceField) |
| 228 |
: wp_json_encode($fieldValues[$fieldName]); |
| 229 |
} elseif (2 === count($repeaterArr) && isset($fieldValues[$repeaterArr[0]])) { |
| 230 |
$repeaterValues = []; |
| 231 |
$repeaterFieldValues = $fieldValues[$repeaterArr[0]]; |
| 232 |
foreach ($repeaterFieldValues as $value) { |
| 233 |
if (isset($value[$repeaterArr[1]])) { |
| 234 |
$repeaterValues[] = $value[$repeaterArr[1]]; |
| 235 |
} |
| 236 |
} |
| 237 |
|
| 238 |
$stringToReplaceField = $repeaterValues; |
| 239 |
} else { |
| 240 |
$stringToReplaceField = FieldValueHandler::replaceSmartTagWithValue($value); |
| 241 |
} |
| 242 |
} |
| 243 |
return $stringToReplaceField; |
| 244 |
} |
| 245 |
|
| 246 |
public static function updatedHiddenFieldValue($formID) |
| 247 |
{ |
| 248 |
$hiddenFields = []; |
| 249 |
$frontendFormManger = FrontendFormManager::getInstance($formID); |
| 250 |
|
| 251 |
if ($frontendFormManger->isHoneypotActive()) { |
| 252 |
$str = '_bitform' . '_' . $formID . '_' . time() . '_'; |
| 253 |
$honpotToken = Helpers::honeypotEncryptedToken($str); |
| 254 |
$hiddenFields[] = [ |
| 255 |
'name' => 'b_h_t', |
| 256 |
'value' => $honpotToken |
| 257 |
]; |
| 258 |
} |
| 259 |
$csrfTokens = Helpers::csrfEecrypted(); |
| 260 |
$hiddenFields[] = [ |
| 261 |
'name' => 't_identity', |
| 262 |
'value' => $csrfTokens['t_identity'], |
| 263 |
]; |
| 264 |
$hiddenFields[] = [ |
| 265 |
'name' => 'csrf', |
| 266 |
'value' => $csrfTokens['csrf'] |
| 267 |
]; |
| 268 |
return $hiddenFields; |
| 269 |
} |
| 270 |
|
| 271 |
public static function maybeSetCronForIntegration($workFlowReturnedData, $opType, $isFormRequest = true) |
| 272 |
{ |
| 273 |
$responseData = []; |
| 274 |
$entryId = $workFlowReturnedData['triggerData']['entryID']; |
| 275 |
$responseData['entry_id'] = $entryId; |
| 276 |
if (isset($workFlowReturnedData['message'])) { |
| 277 |
$formID = $workFlowReturnedData['triggerData']['formID']; |
| 278 |
$responseData['message'] = $workFlowReturnedData['message']; |
| 279 |
$responseData['hidden_fields'] = self::updatedHiddenFieldValue($formID); |
| 280 |
$responseData['msg_id'] = isset($workFlowReturnedData['msg_id']) ? $workFlowReturnedData['msg_id'] : 0; |
| 281 |
if (isset($workFlowReturnedData['msg_duration'])) { |
| 282 |
$responseData['msg_duration'] = $workFlowReturnedData['msg_duration']; |
| 283 |
} |
| 284 |
} |
| 285 |
if (isset($workFlowReturnedData['redirectPage'])) { |
| 286 |
$responseData['redirectPage'] = $workFlowReturnedData['redirectPage']; |
| 287 |
} |
| 288 |
if ('update' === $opType && isset($workFlowReturnedData['updatedData'])) { |
| 289 |
$responseData['updatedData'] = $workFlowReturnedData['updatedData']; |
| 290 |
} |
| 291 |
if (isset($workFlowReturnedData['new_nonce'])) { |
| 292 |
$responseData['new_nonce'] = $workFlowReturnedData['new_nonce']; |
| 293 |
} |
| 294 |
if (!isset($workFlowReturnedData['triggerData'])) { |
| 295 |
return $responseData; |
| 296 |
} |
| 297 |
|
| 298 |
$triggerData = $workFlowReturnedData['triggerData']; |
| 299 |
|
| 300 |
$trnasientData = get_transient("bitform_trigger_transient_{$entryId}"); |
| 301 |
$trnasientData = is_string($trnasientData) ? json_decode($trnasientData) : $trnasientData; |
| 302 |
|
| 303 |
if (!empty($trnasientData['fields'])) { |
| 304 |
$fieldData = isset($workFlowReturnedData['fields']) ? $workFlowReturnedData['fields'] : $workFlowReturnedData['updatedData']; |
| 305 |
$workFlowReturnedData['fields'] = array_merge($fieldData, $trnasientData['fields']); |
| 306 |
} |
| 307 |
|
| 308 |
if (function_exists('fastcgi_finish_request') || !wp_doing_ajax()) { |
| 309 |
if (!headers_sent()) { |
| 310 |
header('Connection: close'); |
| 311 |
$contentType = wp_doing_ajax() || defined('REST_REQUEST') ? 'application/json' : 'text/html'; |
| 312 |
header('Content-Type: ' . $contentType . '; charset=' . get_option('blog_charset')); |
| 313 |
status_header(200); |
| 314 |
if (!$isFormRequest) { |
| 315 |
$response = [ |
| 316 |
'status' => 200, |
| 317 |
'code' => 4000, |
| 318 |
'message' => 'Data Added Successfully!!', |
| 319 |
'success' => true |
| 320 |
]; |
| 321 |
} else { |
| 322 |
$response = [ |
| 323 |
'success' => true, |
| 324 |
'data' => $responseData, |
| 325 |
]; |
| 326 |
} |
| 327 |
} |
| 328 |
ob_start(); |
| 329 |
echo wp_doing_ajax() || defined('REST_REQUEST') ? wp_json_encode($response) : $workFlowReturnedData['message']; |
| 330 |
ob_end_flush(); |
| 331 |
flush(); |
| 332 |
session_write_close(); |
| 333 |
|
| 334 |
if (isset($workFlowReturnedData['integrationRun']) && !$workFlowReturnedData['integrationRun']) { |
| 335 |
$entryModel = new FormEntryModel(); |
| 336 |
$updatedStatus = $entryModel->update( |
| 337 |
[ |
| 338 |
'status' => 2, |
| 339 |
], |
| 340 |
[ |
| 341 |
'form_id' => $triggerData['formID'], |
| 342 |
'id' => $triggerData['entryID'], |
| 343 |
] |
| 344 |
); |
| 345 |
|
| 346 |
$triggerData['fields'] = $workFlowReturnedData['fields']; |
| 347 |
if (!is_wp_error($updatedStatus)) { |
| 348 |
if ($workFlowReturnedData['dflt_template']) { |
| 349 |
// $triggerData['fields'] = $workFlowReturnedData['fields']; |
| 350 |
do_action('bf_double_optin_confirmation', $workFlowReturnedData['integrationDetails'], $triggerData); |
| 351 |
} elseif (isset($triggerData['dblOptin'])) { |
| 352 |
foreach ($triggerData['dblOptin'] as $value) { |
| 353 |
MailNotifier::notify($value, $triggerData['formID'], $triggerData['fields'], $triggerData['entryID'], true, $triggerData['logID']); |
| 354 |
} |
| 355 |
} |
| 356 |
} |
| 357 |
if (function_exists('fastcgi_finish_request')) { |
| 358 |
fastcgi_finish_request(); |
| 359 |
} |
| 360 |
|
| 361 |
if (defined('REST_REQUEST') || wp_doing_ajax()) { |
| 362 |
die; |
| 363 |
} |
| 364 |
return $workFlowReturnedData; |
| 365 |
} |
| 366 |
|
| 367 |
if (isset($triggerData['mail']) && !empty($triggerData['mail'])) { |
| 368 |
$formManager = new AdminFormManager($triggerData['formID']); |
| 369 |
$formContent = $formManager->getFormContent(); |
| 370 |
$submitted_fields = $formContent->fields; |
| 371 |
$fieldValueForMail = FieldValueHandler::formatFieldValueForMail($submitted_fields, $workFlowReturnedData['fields']); |
| 372 |
foreach ($triggerData['mail'] as $value) { |
| 373 |
MailNotifier::notify($value, $triggerData['formID'], $fieldValueForMail, $triggerData['entryID'], false, $triggerData['logID']); |
| 374 |
} |
| 375 |
} |
| 376 |
do_action('bitforms_exec_integrations', $triggerData['integrations'], $workFlowReturnedData['fields'], $triggerData['formID'], $triggerData['entryID'], $triggerData['logID']); |
| 377 |
|
| 378 |
if (function_exists('fastcgi_finish_request')) { |
| 379 |
fastcgi_finish_request(); |
| 380 |
} |
| 381 |
|
| 382 |
if (defined('REST_REQUEST') || wp_doing_ajax()) { |
| 383 |
die; |
| 384 |
} |
| 385 |
return $workFlowReturnedData; |
| 386 |
} |
| 387 |
|
| 388 |
$entryID = $triggerData['entryID']; |
| 389 |
if (isset($workFlowReturnedData['cron']) && $workFlowReturnedData['cron'] && !isset($triggerData['mail']) && isset($workFlowReturnedData['integrationRun']) && $workFlowReturnedData['integrationRun']) { |
| 390 |
$eventScheuled = wp_schedule_single_event(time(), 'bitforms_exec_integrations', [$triggerData['integrations'], $workFlowReturnedData['fields'], $triggerData['formID'], $triggerData['entryID'], $triggerData['logID']]); |
| 391 |
$scheduleTime = wp_next_scheduled('bitforms_exec_integrations', [$triggerData['integrations'], $workFlowReturnedData['fields'], $triggerData['formID'], $triggerData['entryID'], $triggerData['logID']]); |
| 392 |
$responseData['cron'] = get_site_url(null, "/wp-cron.php?doing_wp_cron&{$scheduleTime}"); |
| 393 |
} elseif (!empty($triggerData['integrations']) || !empty($triggerData['mail']) || isset($workFlowReturnedData['integrationRun']) && !$workFlowReturnedData['integrationRun']) { |
| 394 |
$triggerData['fields'] = $workFlowReturnedData['fields']; |
| 395 |
if (!$workFlowReturnedData['integrationRun'] && isset($workFlowReturnedData['integrationDetails'])) { |
| 396 |
$triggerData['dbl_opt_donf'] = $workFlowReturnedData['integrationDetails']; |
| 397 |
$triggerData['dbl_opt_dflt_template'] = $workFlowReturnedData['dflt_template']; |
| 398 |
$triggerData['integrationRun'] = $workFlowReturnedData['integrationRun']; |
| 399 |
} |
| 400 |
|
| 401 |
set_transient("bitform_trigger_transient_{$entryID}", $triggerData, HOUR_IN_SECONDS); |
| 402 |
$entryLog = new FormEntryLogModel(); |
| 403 |
$queueuEntry = $entryLog->log_history_insert( |
| 404 |
[ |
| 405 |
'log_id' => $triggerData['logID'], |
| 406 |
'integration_id' => 0, |
| 407 |
'api_type' => wp_json_encode(['type' => 'trigger', 'type_name' => 'Workflow', 'on' => $opType]), |
| 408 |
'response_type' => 'queued', |
| 409 |
'response_obj' => wp_json_encode(['status' => 'queued']), |
| 410 |
'created_at' => current_time('mysql'), |
| 411 |
] |
| 412 |
); |
| 413 |
$responseData['cronNotOk'] = [ |
| 414 |
$triggerData['entryID'], |
| 415 |
$triggerData['logID'], |
| 416 |
$queueuEntry, |
| 417 |
]; |
| 418 |
} |
| 419 |
return $responseData; |
| 420 |
} |
| 421 |
|
| 422 |
public static function repeaterFieldValueFormatter($fieldValues) |
| 423 |
{ |
| 424 |
$formattedArray = []; |
| 425 |
|
| 426 |
foreach ($fieldValues as $key => $value) { |
| 427 |
if (is_array($value)) { |
| 428 |
foreach ($value as $index => $v) { |
| 429 |
if (is_array($v)) { |
| 430 |
foreach ($v as $k1 => $v1) { |
| 431 |
$formattedArray[$k1][] = $v1; |
| 432 |
} |
| 433 |
} else { |
| 434 |
$formattedArray[$key][] = $v; |
| 435 |
} |
| 436 |
} |
| 437 |
} else { |
| 438 |
$formattedArray[$key] = $value; |
| 439 |
} |
| 440 |
} |
| 441 |
|
| 442 |
return $formattedArray; |
| 443 |
} |
| 444 |
|
| 445 |
/** |
| 446 |
* |
| 447 |
* @param mixed $fieldValues |
| 448 |
* @param mixed $returnRepeaterValue default is array |
| 449 |
* @return array and repeater field value as array or string |
| 450 |
*/ |
| 451 |
public static function formattedRepeaterValue($fieldValues, $returnRepeaterValue = '') |
| 452 |
{ |
| 453 |
// get the repeater field and store it in an array |
| 454 |
$repeaterField = []; |
| 455 |
foreach ($fieldValues as $key => $value) { |
| 456 |
if (!preg_match('/\./', $key)) { |
| 457 |
continue; |
| 458 |
} |
| 459 |
$repeaterField[] = $key; |
| 460 |
} |
| 461 |
|
| 462 |
// put the value of the child key to the parent repeater field\ |
| 463 |
foreach ($repeaterField as $key) { |
| 464 |
list($parentKey, $childKey) = explode('.', $key); |
| 465 |
$repeatValues = isset($fieldValues[$parentKey]) ? $fieldValues[$parentKey] : $key; |
| 466 |
|
| 467 |
if (!is_array($repeatValues)) { |
| 468 |
$fieldValues[$key] = $fieldValues[$childKey]; |
| 469 |
continue; |
| 470 |
} |
| 471 |
|
| 472 |
foreach ($repeatValues as $value) { |
| 473 |
if (isset($value[$childKey])) { |
| 474 |
if (!isset($fieldValues[$key]) || !is_array($fieldValues[$key])) { |
| 475 |
$fieldValues[$key] = []; |
| 476 |
} |
| 477 |
if (!empty($value[$childKey])) { |
| 478 |
$fieldValues[$key][] = $value[$childKey]; |
| 479 |
} |
| 480 |
} |
| 481 |
} |
| 482 |
} |
| 483 |
|
| 484 |
// convert the array to string repeater field value |
| 485 |
if ('string' === $returnRepeaterValue) { |
| 486 |
foreach ($repeaterField as $key) { |
| 487 |
if (isset($fieldValues[$key]) && is_array($fieldValues[$key])) { |
| 488 |
$fieldValues[$key] = implode(', ', $fieldValues[$key]); |
| 489 |
} |
| 490 |
} |
| 491 |
} |
| 492 |
return $fieldValues; |
| 493 |
} |
| 494 |
} |
| 495 |
|