Skip to content

Commit

Permalink
Fixes for custom group query escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
JKingsnorth committed Sep 4, 2017
1 parent 348d2f4 commit fb8f485
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion CRM/Core/BAO/CustomGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,6 @@ public static function &getGroupDetail($groupId = NULL, $searchable = NULL, &$ex
);

// create select
$select = "SELECT";
$s = array();
foreach ($tableData as $tableName => $tableColumn) {
foreach ($tableColumn as $columnName) {
Expand Down
5 changes: 2 additions & 3 deletions CRM/Event/BAO/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,9 @@ public static function del($id) {
$extends = array('event');
$groupTree = CRM_Core_BAO_CustomGroup::getGroupDetail(NULL, NULL, $extends);
foreach ($groupTree as $values) {
$query = "DELETE FROM %1 WHERE entity_id = %2";
$query = "DELETE FROM " . $values['table_name'] . " WHERE entity_id = %1";
CRM_Core_DAO::executeQuery($query, array(
1 => array($values['table_name'], 'string'),
2 => array($id, 'integer'),
1 => array($id, 'Integer'),
));
}

Expand Down

0 comments on commit fb8f485

Please sign in to comment.