From 894ce8947c6d87e2bb7a7d2f8c91577c5a99ca11 Mon Sep 17 00:00:00 2001 From: yogeshwar <yogeshwar.g@vtigersolutions.com> Date: Mon, 20 May 2024 14:21:45 +0530 Subject: [PATCH] E-all Cleanups-Leads --- data/CRMEntity.php | 5 ++++- data/VTEntityDelta.php | 21 ++++++------------- include/ListView/ListViewSession.php | 1 + .../v7/modules/Vtiger/ComposeEmailForm.tpl | 2 +- layouts/v7/modules/Vtiger/OverlayEditView.tpl | 7 ++++++- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/data/CRMEntity.php b/data/CRMEntity.php index daede567c..9451472aa 100644 --- a/data/CRMEntity.php +++ b/data/CRMEntity.php @@ -3140,7 +3140,10 @@ class TrackableObject implements ArrayAccess, IteratorAggregate { #[\ReturnTypeWillChange] function offsetSet($key, $value) { - if(is_array($value)) $value = !empty($value) && array_key_exists(0,$value) ? $value[0] : ""; //modified to prevent warning of Undefined array key 0 . + // file_put_contents('test7arrayvalue.log',print_r($value,true),FILE_APPEND); + // file_put_contents("duparray.log", sprintf("ENTRIES: %s\n", var_export($value, true)), FILE_APPEND); + // file_put_contents("duparray.log", sprintf("ENTRIES: %s\n", var_export($key, true)), FILE_APPEND); + if(is_array($value)) $value = empty($value) ? "" : (array_key_exists(0, $value) ? $value[0] : ""); //it is an associative array without a key 0 modified to prevent warning of Undefined array key 0 . if($this->tracking && $this->trackingEnabled) { $olderValue = $this->offsetGet($key); // decode_html only expects string diff --git a/data/VTEntityDelta.php b/data/VTEntityDelta.php index 431ece2d1..1dfd40951 100644 --- a/data/VTEntityDelta.php +++ b/data/VTEntityDelta.php @@ -112,28 +112,19 @@ class VTEntityDelta extends VTEventHandler { if(empty(self::$oldEntity[$moduleName][$recordId])) { return false; } - - $fieldDelta = isset(self::$entityDelta[$moduleName][$recordId][$fieldName]) ? self::$entityDelta[$moduleName][$recordId][$fieldName] :' '; - if(is_array($fieldDelta) && isset($fieldDelta['oldValue']) && isset($fieldDelta['currentValue'])) { - if (!array_key_exists($fieldName, self::$entityDelta[$moduleName][$recordId])) { return false; } $fieldDelta = self::$entityDelta[$moduleName][$recordId][$fieldName]; if(is_array($fieldDelta)) { - $fieldDelta = array_map('decode_html', $fieldDelta); - $result = $fieldDelta['oldValue'] != $fieldDelta['currentValue']; - if ($fieldValue !== NULL) { - $result = $result && ($fieldDelta['currentValue'] === $fieldValue); - } - return $result; } - else{ - return; + $result = $fieldDelta['oldValue'] != $fieldDelta['currentValue']; + if ($fieldValue !== NULL) { + $result = $result && ($fieldDelta['currentValue'] === $fieldValue); } + return $result; + } + } - -} -} ?> diff --git a/include/ListView/ListViewSession.php b/include/ListView/ListViewSession.php index eaa6f4620..790aab942 100644 --- a/include/ListView/ListViewSession.php +++ b/include/ListView/ListViewSession.php @@ -75,6 +75,7 @@ class ListViewSession { } $cv = new CustomView(); $viewId = $cv->getViewId($currentModule); + $recordNavigationInfo = array(); if(!empty($_SESSION[$currentModule.'_DetailView_Navigation'.$viewId])){ $recordNavigationInfo = Zend_Json::decode($_SESSION[$currentModule.'_DetailView_Navigation'.$viewId]); $pageNumber =0; diff --git a/layouts/v7/modules/Vtiger/ComposeEmailForm.tpl b/layouts/v7/modules/Vtiger/ComposeEmailForm.tpl index b18eac1fd..dea10cf2b 100644 --- a/layouts/v7/modules/Vtiger/ComposeEmailForm.tpl +++ b/layouts/v7/modules/Vtiger/ComposeEmailForm.tpl @@ -171,7 +171,7 @@ </div> <div class="row templateContent"> <div class="col-lg-12"> - <textarea style="width:390px;height:200px;" id="description" name="description">{isset($DESCRIPTION) ? $DESCRIPTION : ''}</textarea> + <textarea style="width:390px;height:200px;" id="description" name="description">{$DESCRIPTION}</textarea> </div> </div> diff --git a/layouts/v7/modules/Vtiger/OverlayEditView.tpl b/layouts/v7/modules/Vtiger/OverlayEditView.tpl index 05e9c29ea..e7790c9f4 100644 --- a/layouts/v7/modules/Vtiger/OverlayEditView.tpl +++ b/layouts/v7/modules/Vtiger/OverlayEditView.tpl @@ -13,7 +13,12 @@ <div class='fc-overlay-modal modal-content overlayEdit'> <div class="overlayHeader"> - {assign var=TITLE value="{vtranslate('LBL_EDITING', $MODULE)} {vtranslate(isset($SINGLE_MODULE_NAME)? $SINGLE_MODULE_NAME : '', $MODULE)} - {$RECORD_STRUCTURE_MODEL->getRecordName()}"} + {if isset($SINGLE_MODULE_NAME)} + {assign var="singleModuleName" value=$SINGLE_MODULE_NAME} + {else} + {assign var="singleModuleName" value=""} + {/if} + {assign var=TITLE value="{vtranslate('LBL_EDITING', $MODULE)} {vtranslate($singleModuleName, $MODULE)} - {$RECORD_STRUCTURE_MODEL->getRecordName()}"} {include file="ModalHeader.tpl"|vtemplate_path:$MODULE} </div> <form class="form-horizontal recordEditView" id="EditView" name="edit" method="post" action="index.php" enctype="multipart/form-data"> -- GitLab