/** * we must overwrite it here, because the task publish can be meant for two different list layouts. */ function publish($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::publish('tsmart_rating_review_id', 'rating_reviews', $this->redirectPath . $redPath); } else { parent::publish(); } }