Skip to content

Commit

Permalink
Merge pull request #13486 from deb1990/core-670-fix-activity-tags
Browse files Browse the repository at this point in the history
(WIP) dev/core#670 - Fix Saving of Case Activity tags
  • Loading branch information
colemanw authored Jan 21, 2019
2 parents d0fe005 + 63b7aef commit bf6eb37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 2 additions & 3 deletions CRM/Activity/Form/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -1066,9 +1066,8 @@ protected function processActivity(&$params) {
if (!is_array($params['tag'])) {
$params['tag'] = explode(',', $params['tag']);
}
foreach ($params['tag'] as $tag) {
$tagParams[$tag] = 1;
}

$tagParams = array_fill_keys($params['tag'], 1);
}

// Save static tags.
Expand Down
6 changes: 4 additions & 2 deletions CRM/Case/Form/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -543,9 +543,11 @@ public function postProcess($params = NULL) {
// add tags if exists
$tagParams = array();
if (!empty($params['tag'])) {
foreach ($params['tag'] as $tag) {
$tagParams[$tag] = 1;
if (!is_array($params['tag'])) {
$params['tag'] = explode(',', $params['tag']);
}

$tagParams = array_fill_keys($params['tag'], 1);
}

//save static tags
Expand Down

0 comments on commit bf6eb37

Please sign in to comment.