private function _checkCriterion() { $action_criterion = Tools::getValue('criterion_action'); $name = Tools::getValue('criterion'); if (Tools::isSubmit('submitCriterion') and empty($action_criterion) and !empty($name)) { global $cookie; require_once dirname(__FILE__) . '/ProductCommentCriterion.php'; ProductCommentCriterion::add($cookie->id_lang, $name); $this->_html .= '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="' . $this->l('Confirmation') . '" />' . $this->l('Settings updated') . '</div>'; } elseif (!empty($action_criterion) and empty($name)) { $id_product_comment_criterion = Tools::getValue('id_product_comment_criterion'); require_once dirname(__FILE__) . '/ProductCommentCriterion.php'; switch ($action_criterion) { case 'edit': ProductCommentCriterion::update($id_product_comment_criterion, Tools::getValue('criterion_id_lang'), Tools::getValue('criterion_name')); break; case 'delete': ProductCommentCriterion::delete($id_product_comment_criterion); break; default: } } }