From cd4d0274edc8bbbfc669c54ae94932d1a769ff87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cankush=5Fm=E2=80=9D?= Date: Fri, 29 Nov 2019 14:16:17 +0530 Subject: [PATCH] Bug #153497 fix: Front end>> Form Submission taking longer time to send submitted successfully message to the user. --- .../houseKeeping/1.2.3/updateClientName.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php b/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php index 81d6c65f..bd7319e7 100644 --- a/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php +++ b/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php @@ -98,7 +98,24 @@ public function migrate() $tjfieldsFieldTable = JTable::getInstance('Field', 'TjfieldsTable', array('dbo', $db)); $tjfieldsFieldTable->load($field->id); $tjfieldsFieldTable->client = $updatedUniqueIdentifier; - $tjfieldsFieldTable->name = str_replace('.', '_', $updatedUniqueIdentifier) . '_' . strtolower(preg_replace("/[^a-zA-Z0-9]/", "", $field->label)); + + if ($tjfieldsFieldTable->type == 'cluster') + { + $tjfieldsFieldTable->name = str_replace('.', '_', $updatedUniqueIdentifier) . '_clusterid'; + } + elseif ($tjfieldsFieldTable->type == 'ownership') + { + $tjfieldsFieldTable->name = str_replace('.', '_', $updatedUniqueIdentifier) . '_createdby'; + } + elseif ($tjfieldsFieldTable->type == 'itemcategory') + { + $tjfieldsFieldTable->name = str_replace('.', '_', $updatedUniqueIdentifier) . '_itemcategory'; + } + else + { + $tjfieldsFieldTable->name = str_replace('.', '_', $updatedUniqueIdentifier) . '_' . strtolower(preg_replace("/[^a-zA-Z0-9]/", "", $field->label)); + } + $tjfieldsFieldTable->store(); // Check if field name is unique