Skip to content
Snippets Groups Projects
Commit 4f652853 authored by totten's avatar totten
Browse files

CRM-12647 - CRM_Utils_Migrate - Extract constant for special delimiter

----------------------------------------
* CRM-12647: Customization export/import crashes on "&"
  http://issues.civicrm.org/jira/browse/CRM-12647
parent 8575f879
Branches
Tags
No related merge requests found
......@@ -34,6 +34,8 @@
*/
class CRM_Utils_Migrate_Export {
const XML_VALUE_SEPARATOR = ":;:;:;";
protected $_xml;
function __construct() {
......@@ -405,7 +407,7 @@ AND entity_id IS NULL
}
else {
$value = str_replace(CRM_Core_DAO::VALUE_SEPARATOR,
":;:;:;",
self::XML_VALUE_SEPARATOR,
$object->$name
);
$xml .= "\n <$name>$value</$name>";
......
......@@ -92,7 +92,7 @@ class CRM_Utils_Migrate_Import {
foreach ($fields as $name => $dontCare) {
if (isset($xml->$name)) {
$value = (string ) $xml->$name;
$value = str_replace(":;:;:;",
$value = str_replace(CRM_Utils_Migrate_Export::XML_VALUE_SEPARATOR,
CRM_Core_DAO::VALUE_SEPARATOR,
$value
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment