From 1e6ab3bdf03af36db135185c0b9e86078bb4cf93 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Thu, 23 Jun 2016 09:26:24 +0000 Subject: [PATCH] Support of Custom Fields in the Excel export... not really nice but should be usable. SVN:trunk[4256] --- core/excelbulkexport.class.inc.php | 5 +++++ core/ormcustomfieldsvalue.class.inc.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/excelbulkexport.class.inc.php b/core/excelbulkexport.class.inc.php index fc03918b9..d1e12808a 100644 --- a/core/excelbulkexport.class.inc.php +++ b/core/excelbulkexport.class.inc.php @@ -188,6 +188,11 @@ EOF $oAttDef = MetaModel::GetAttributeDef(get_class($oObj), $sAttCode); $sRet = $oAttDef->GetAsCSV($value, '', '', $oObj); } + else if ($value instanceOf ormCustomFieldsValue) + { + $oAttDef = MetaModel::GetAttributeDef(get_class($oObj), $sAttCode); + $sRet = $oAttDef->GetAsCSV($value, "\n", '', $oObj); + } else { $oAttDef = MetaModel::GetAttributeDef(get_class($oObj), $sAttCode); diff --git a/core/ormcustomfieldsvalue.class.inc.php b/core/ormcustomfieldsvalue.class.inc.php index ad81da24d..ad58e7f6c 100644 --- a/core/ormcustomfieldsvalue.class.inc.php +++ b/core/ormcustomfieldsvalue.class.inc.php @@ -74,7 +74,7 @@ class ormCustomFieldsValue { $oAttDef = MetaModel::GetAttributeDef(get_class($this->oHostObject), $this->sAttCode); $oHandler = $oAttDef->GetHandler($this->GetValues()); - return $oHandler->GetAsCSV($this->aCurrentValues, $sSeparator = ',', $sTextQualifier = '"', $bLocalize = true); + return $oHandler->GetAsCSV($this->aCurrentValues, $sSeparator, $sTextQualifier, $bLocalize); } /**