src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php
protected function DeleteConnectedComments($oReviewItem)
    {
        if ($this->AllowToCommentReview()) {
            $sQuery = "SELECT `pkg_comment`.* FROM `cms_tbl_conf`
                    INNER JOIN `pkg_comment_type` ON `pkg_comment_type`.`cms_tbl_conf_id` = `cms_tbl_conf`.`id`
                    INNER JOIN `pkg_comment` ON `pkg_comment`.`pkg_comment_type_id` = `pkg_comment_type`.`id`
                    WHERE `pkg_comment_type`.`class_name` = 'TPkgCommentTypePkgShopArticleReview'
                    AND `cms_tbl_conf`.`name` = '".MySqlLegacySupport::getInstance()->real_escape_string($oReviewItem->table)."'
                    AND `pkg_comment`.`item_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($oReviewItem->id)."'";
            $oConnectedCommentList = TdbPkgCommentList::GetList($sQuery);
            while ($oConnectedComment = $oConnectedCommentList->Next()) {
                $oCommentEditor = TTools::GetTableEditorManager('pkg_comment', $oConnectedComment->id);
                $oCommentEditor->AllowDeleteByAll(true);
                $oCommentEditor->Delete($oConnectedComment->id);
            }
        }
    }
protected function DeleteConnectedComments($oReviewItem)
    {
        if ($this->AllowToCommentReview()) {
            $sQuery = "SELECT `pkg_comment`.* FROM `cms_tbl_conf`
                    INNER JOIN `pkg_comment_type` ON `pkg_comment_type`.`cms_tbl_conf_id` = `cms_tbl_conf`.`id`
                    INNER JOIN `pkg_comment` ON `pkg_comment`.`pkg_comment_type_id` = `pkg_comment_type`.`id`
                    WHERE `pkg_comment_type`.`class_name` = 'TPkgCommentTypePkgShopArticleReview'
                    AND `cms_tbl_conf`.`name` = '".MySqlLegacySupport::getInstance()->real_escape_string($oReviewItem->table)."'
                    AND `pkg_comment`.`item_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($oReviewItem->id)."'";
            $oConnectedCommentList = TdbPkgCommentList::GetList($sQuery);
            while ($oConnectedComment = $oConnectedCommentList->Next()) {
                $oCommentEditor = TTools::GetTableEditorManager('pkg_comment', $oConnectedComment->id);
                $oCommentEditor->AllowDeleteByAll(true);
                $oCommentEditor->Delete($oConnectedComment->id);
            }
        }
    }
protected function DeleteConnectedComments ( $ oReviewItem ) { if ( $ this -> AllowToCommentReview ( ) ) { $ sQuery = "SELECT `pkg_comment`.* FROM `cms_tbl_conf`
                    INNER JOIN `pkg_comment_type` ON `pkg_comment_type`.`cms_tbl_conf_id` = `cms_tbl_conf`.`id`
                    INNER JOIN `pkg_comment` ON `pkg_comment`.`pkg_comment_type_id` = `pkg_comment_type`.`id`
                    WHERE `pkg_comment_type`.`class_name` = 'TPkgCommentTypePkgShopArticleReview'
                    AND `cms_tbl_conf`.`name` = '" . MySqlLegacySupport :: getInstance ( ) -> real_escape_string ( $ oReviewItem -> table ) . "'
                    AND `pkg_comment`.`item_id` = '" . MySqlLegacySupport :: getInstance ( ) -> real_escape_string ( $ oReviewItem -> id ) . "'" ; $ oConnectedCommentList = TdbPkgCommentList :: GetList ( $ sQuery ) ; while ( $ oConnectedComment = $ oConnectedCommentList -> Next ( ) ) { $ oCommentEditor = TTools :: GetTableEditorManager ( 'pkg_comment' , $ oConnectedComment -> id ) ; $ oCommentEditor -> AllowDeleteByAll ( true ) ; $ oCommentEditor -> Delete ( $ oConnectedComment -> id ) ; } } }
Deletes all comment for a given review.

@param TdbShopArticleReview $oReviewItem
Deletes all comment for a given review .