} else { if ($http->hasPostVariable('NoButton')) { return $Module->redirectToView('id', array($tagID)); } if ($http->hasPostVariable('YesButton')) { $db = eZDB::instance(); $db->begin(); $parentTag = $tag->getParent(); if ($parentTag instanceof eZTagsObject) { $parentTag->updateModified(); } /* Extended Hook */ if (class_exists('ezpEvent', false)) { ezpEvent::getInstance()->filter('tag/delete', $tag); } eZTagsObject::recursiveTagDelete($tag); $db->commit(); if ($parentTag instanceof eZTagsObject) { return $Module->redirectToView('id', array($parentTag->attribute('id'))); } else { return $Module->redirectToView('dashboard', array()); } } } $tpl = eZTemplate::factory(); $tpl->setVariable('tag', $tag); $tpl->setVariable('delete_allowed', $deleteAllowed); $tpl->setVariable('error', $error); $Result = array(); $Result['content'] = $tpl->fetch('design:tags/delete.tpl'); $Result['ui_context'] = 'edit';