Browse Source

N.755 Case log preset by object copier is not correcly displayed in the object creation form (if combined with the copy of the previous log AND if that log has at least one entry). Has never worked.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4672 a333f486-631f-4898-b8df-5754b55c2be0
romainq 8 năm trước cách đây
mục cha
commit
231732afdd
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      core/ormcaselog.class.inc.php

+ 3 - 2
core/ormcaselog.class.inc.php

@@ -388,8 +388,9 @@ class ormCaseLog {
 		if (($bEditMode) && (count($aIndex) > 0) && $this->m_bModified)
 		{
 			// Don't display the first element, that is still considered as editable
-			$iPos = $aIndex[0]['separator_length'] + $aIndex[0]['text_length'];
-			array_shift($aIndex); 
+			$aLastEntry = end($aIndex);
+			$iPos = $aLastEntry['separator_length'] + $aLastEntry['text_length'];
+			array_pop($aIndex);
 		}
 		for($index=count($aIndex)-1 ; $index >= 0 ; $index--)
 		{