diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index 2dc9665e3..bf8e3e6c6 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -5386,6 +5386,14 @@ class AttributeFriendlyName extends AttributeComputedFieldVoid return Str::pure2html((string)$sValue); } + public function GetAsCSV($sValue, $sSeparator = ',', $sTextQualifier = '"', $oHostObject = null, $bLocalize = true) + { + $sFrom = array("\r\n", $sTextQualifier); + $sTo = array("\n", $sTextQualifier.$sTextQualifier); + $sEscaped = str_replace($sFrom, $sTo, (string)$sValue); + return $sTextQualifier.$sEscaped.$sTextQualifier; + } + // Do not display friendly names in the history of change public function DescribeChangeAsHTML($sOldValue, $sNewValue, $sLabel = null) {