Skip to content
Snippets Groups Projects
Commit 6260bb0f authored by eileen's avatar eileen
Browse files

Remove enclosed variable.

Given that it can only ever be a double quote parameterizing it is only confusing
parent c77f9b14
Branches
Tags
No related merge requests found
......@@ -40,13 +40,11 @@ class CRM_Core_Report_Excel {
$config = CRM_Core_Config::singleton();
$seperator = $config->fieldSeparator;
$enclosed = '"';
$escaped = $enclosed;
$add_character = "\015\012";
$schema_insert = '';
foreach ($header as $field) {
$schema_insert .= $enclosed . str_replace($enclosed, $escaped . $enclosed, stripslashes($field)) . $enclosed;
$schema_insert .= '"' . str_replace('"', '""', stripslashes($field)) . '"';
$schema_insert .= $seperator;
}
// end while
......@@ -87,7 +85,7 @@ class CRM_Core_Report_Excel {
$value = &$str;
}
$schema_insert .= $enclosed . str_replace($enclosed, $escaped . $enclosed, $value) . $enclosed;
$schema_insert .= '"' . str_replace('"', '""', $value) . '"';
}
if ($colNo < $fields_cnt - 1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment