public function ajaxRemoveVideoTag($videoId, $userId) { $filter = JFilterInput::getInstance(); $videoId = $filter->clean($videoId, 'int'); $userId = $filter->clean($userId, 'int'); if (!COwnerHelper::isRegisteredUser()) { return $this->ajaxBlockUnregister(); } $my = CFactory::getUser(); $json = array(); if (!$my->authorise('community.remove', 'videos.tag.' . $videoId)) { $json['error'] = JText::_('ACCESS FORBIDDEN'); die(json_encode($json)); } $tagging = new CVideoTagging(); if (!$tagging->removeTag($videoId, $userId)) { $json['error'] = $tagging->getError(); die(json_encode($json)); } $json['success'] = true; die(json_encode($json)); }