Ejemplo n.º 1
0
 function unpublish($cidname = 0, $table = 0, $redirect = 0)
 {
     vRequest::vmCheckToken();
     $layout = vRequest::getString('layout', 'default');
     if ($layout == 'list_reviews') {
         $tsmart_product_id = vRequest::getInt('tsmart_product_id');
         if (is_array($tsmart_product_id) && count($tsmart_product_id) > 0) {
             $tsmart_product_id = (int) $tsmart_product_id[0];
         } else {
             $tsmart_product_id = (int) $tsmart_product_id;
         }
         $redPath = '';
         if (!empty($tsmart_product_id)) {
             $redPath = '&task=listreviews&tsmart_product_id=' . $tsmart_product_id;
         }
         parent::unpublish('tsmart_rating_review_id', 'rating_reviews', $this->redirectPath . $redPath);
     } else {
         parent::unpublish();
     }
 }