浏览代码

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 13 年之前
父节点
当前提交
6c2353ff87
共有 1 个文件被更改,包括 7 次插入0 次删除
  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));