From 18e61355b64224e7af003ac612d1dc4721f1bf4b Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 16 May 2013 18:34:31 -0400 Subject: [PATCH] CRM-12647 - CRM_Utils_Migrate_Export - Cleanup ---------------------------------------- * CRM-12647: Customization export/import crashes on "&" http://issues.civicrm.org/jira/browse/CRM-12647 --- CRM/Utils/Migrate/Export.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/CRM/Utils/Migrate/Export.php b/CRM/Utils/Migrate/Export.php index 2170b01c3f..e4b6204069 100644 --- a/CRM/Utils/Migrate/Export.php +++ b/CRM/Utils/Migrate/Export.php @@ -359,9 +359,7 @@ AND entity_id IS NULL $key = 'relationship_type'; } $xml .= "\n " . $this->renderTextTag('extends_entity_column_value_option_group', $key); - $types = explode(CRM_Core_DAO::VALUE_SEPARATOR, - substr($object->$name, 1, -1) - ); + $types = explode(CRM_Core_DAO::VALUE_SEPARATOR, substr($object->$name, 1, -1)); $value = array(); foreach ($types as $type) { $values[] = $this->_xml['optionValue']['map']["$key.{$type}"]; @@ -382,15 +380,11 @@ AND entity_id IS NULL list($tableName, $columnName, $groupID) = CRM_Core_BAO_CustomField::getTableColumnGroup($cfID); $value = "custom.{$tableName}.{$columnName}"; } - $xml .= "\n " . $this->renderTextTag($name, $value); } else { - $value = str_replace(CRM_Core_DAO::VALUE_SEPARATOR, - self::XML_VALUE_SEPARATOR, - $object->$name - ); - $xml .= "\n " . $this->renderTextTag($name, $value); + $value = str_replace(CRM_Core_DAO::VALUE_SEPARATOR, self::XML_VALUE_SEPARATOR, $object->$name); } + $xml .= "\n " . $this->renderTextTag($name, $value); } } if ($additional) { -- 2.25.1