Merge branch 'hotfix-2.2.1'

pull/219/merge
iglocska 2014-02-19 17:39:13 +01:00
commit 1af6979365
1 changed files with 2 additions and 1 deletions

View File

@ -73,7 +73,8 @@ class TagsController extends AppController {
if (!$this->Tag->exists()) {
throw new NotFoundException('Invalid tag');
}
if ($this->Attribute->delete()) {
if ($this->Tag->delete()) {
$this->Tag->EventTag->deleteAll(array('EventTag.tag_id' => $id));
$this->Session->setFlash(__('Attribute deleted'));
} else {
$this->Session->setFlash(__('Attribute was not deleted'));