浏览代码

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 年之前
父节点
当前提交
231732afdd
共有 1 个文件被更改,包括 3 次插入2 次删除
  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--)
 		{