Add missing tags from pushed events

pull/1600/head
Richard van den Berg 2016-10-07 14:21:01 +02:00
parent fe972118d5
commit 8a72bd43a2
1 changed files with 3 additions and 3 deletions

View File

@ -2059,9 +2059,9 @@ class Event extends AppModel {
}
}
}
if (isset($data['Event']['Tag']) && $user['Role']['perm_tagger']) {
foreach ($data['Event']['Tag'] as $tag) {
$tag_id = $this->EventTag->Tag->captureTag($tag, $user);
if (isset($data['Event']['EventTag']) && $user['Role']['perm_tagger']) {
foreach ($data['Event']['EventTag'] as $tag) {
$tag_id = $this->EventTag->Tag->captureTag($tag['Tag'], $user);
if ($tag_id) {
$this->EventTag->attachTagToEvent($this->id, $tag_id);
} else {