Skip to content

Commit

Permalink
Merge pull request #9433 from seamuslee001/CRM-19641-b
Browse files Browse the repository at this point in the history
CRM-19641 Further Fix
  • Loading branch information
eileenmcnaughton authored Nov 23, 2016
2 parents aab2552 + 4e2be64 commit 434771c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CRM/Case/XMLProcessor/Report.php
Original file line number Diff line number Diff line change
Expand Up @@ -688,10 +688,11 @@ public function getActivityTypeCustomSQL($activityTypeID, $dateFormat = NULL) {

foreach ($sql as $tableName => $values) {
$columnNames = implode(',', $values);
$tableName = CRM_Utils_Type::escape($tableName, 'MysqlColumnNameOrAlias');
$title = CRM_Core_DAO::escapeString($groupTitle[$tableName]);
$mysqlTableName = CRM_Utils_Type::escape($tableName, 'MysqlColumnNameOrAlias');
$sql[$tableName] = "
SELECT '" . CRM_Core_DAO::escapeString($groupTitle[$tableName]) . "' as groupTitle, $columnNames
FROM $tableName
SELECT '" . $title . "' as groupTitle, $columnNames
FROM $mysqlTableName
WHERE entity_id = %1
";
}
Expand Down

0 comments on commit 434771c

Please sign in to comment.