Преглед на файлове

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--)
 		{