Exports: Friendly names to be escaped and delimited in CSV (bug more exposed now that the export allows field selection)

SVN:trunk[3680]
This commit is contained in:
Romain Quetiez
2015-08-17 14:54:04 +00:00
parent 712931b728
commit 7c8a348ead

View File

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