Exemplo n.º 1
0
 private function _checkModerateComment()
 {
     $action = Tools::getValue('moderate_action');
     if (empty($action) === false) {
         $product_comments = Tools::getValue('id_product_comment');
         if (count($product_comments)) {
             switch ($action) {
                 case 'accept':
                     foreach ($product_comments as $id_product_comment) {
                         if (!$id_product_comment) {
                             continue;
                         }
                         tdpsblogModel::validate($id_product_comment);
                     }
                     break;
                 case 'delete':
                     foreach ($product_comments as $id_product_comment) {
                         if (!$id_product_comment) {
                             continue;
                         }
                         $this->delete($id_product_comment);
                     }
                     break;
                 default:
             }
         }
     }
 }