Parcourir la source

Notifications: case log in plain text (this->case_log) or the latest entry (this->head(case_log))

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1513 a333f486-631f-4898-b8df-5754b55c2be0
romainq il y a 13 ans
Parent
commit
6c2353ff87
1 fichiers modifiés avec 7 ajouts et 0 suppressions
  1. 7 0
      core/dbobject.class.php

+ 7 - 0
core/dbobject.class.php

@@ -1586,6 +1586,13 @@ abstract class DBObject
 					$aScalarArgs[$sArgName.'->html('.$sAttCode.')'] = $sAsHtml;
 					$aScalarArgs[$sArgName.'->label('.$sAttCode.')'] = strip_tags($sAsHtml);
 				}
+				// Do something for case logs... quick N' dirty...
+				if ($aScalarArgs[$sArgName.'->'.$sAttCode] instanceof ormCaseLog)
+				{
+					$oCaseLog = $aScalarArgs[$sArgName.'->'.$sAttCode];
+					$aScalarArgs[$sArgName.'->'.$sAttCode] = $oCaseLog->GetText();
+					$aScalarArgs[$sArgName.'->head('.$sAttCode.')'] = $oCaseLog->GetLatestEntry();
+				}
 			}
 			$this->m_aAsArgs = $aScalarArgs;
 			$oKPI->ComputeStats('ToArgs', get_class($this));