src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php
protected function DeleteReviewFromActionId()
    {
        $oReviewItem = TdbShopArticleReview::GetNewInstance();
        $oGlobal = TGlobal::instance();
        $oMsgManager = TCMSMessageManager::GetInstance();
        if ($oReviewItem->LoadFromField('action_id', $oGlobal->GetUserData(TdbShopArticleReview::URL_PARAM_ACTION_ID))) {
            if (0 == $oReviewItem->sqlData['publish']) {
                $this->DeleteConnectedComments($oReviewItem);
                $oReviewItem->AllowEditByAll(true);
                $oReviewItem->Delete();
                $oMsgManager->AddMessage(self::MSG_CONSUMER_NAME, 'ARTICLE-REVIEW-DELETE-SUCCESS');
            } else {
                $oMsgManager->AddMessage(self::MSG_CONSUMER_NAME, 'ARTICLE-REVIEW-ACTION-REVIEW-NOT-BLOCKED');
            }
        } else {
            $oMsgManager->AddMessage(self::MSG_CONSUMER_NAME, 'ARTICLE-REVIEW-ACTION-REVIEW-NOT-FOUND');
        }
    }
protected function DeleteReviewFromActionId()
    {
        $oReviewItem = TdbShopArticleReview::GetNewInstance();
        $oGlobal = TGlobal::instance();
        $oMsgManager = TCMSMessageManager::GetInstance();
        if ($oReviewItem->LoadFromField('action_id', $oGlobal->GetUserData(TdbShopArticleReview::URL_PARAM_ACTION_ID))) {
            if (0 == $oReviewItem->sqlData['publish']) {
                $this->DeleteConnectedComments($oReviewItem);
                $oReviewItem->AllowEditByAll(true);
                $oReviewItem->Delete();
                $oMsgManager->AddMessage(self::MSG_CONSUMER_NAME, 'ARTICLE-REVIEW-DELETE-SUCCESS');
            } else {
                $oMsgManager->AddMessage(self::MSG_CONSUMER_NAME, 'ARTICLE-REVIEW-ACTION-REVIEW-NOT-BLOCKED');
            }
        } else {
            $oMsgManager->AddMessage(self::MSG_CONSUMER_NAME, 'ARTICLE-REVIEW-ACTION-REVIEW-NOT-FOUND');
        }
    }
protected function DeleteReviewFromActionId ( ) { $ oReviewItem = TdbShopArticleReview :: GetNewInstance ( ) ; $ oGlobal = TGlobal :: instance ( ) ; $ oMsgManager = TCMSMessageManager :: GetInstance ( ) ; if ( $ oReviewItem -> LoadFromField ( 'action_id' , $ oGlobal -> GetUserData ( TdbShopArticleReview :: URL_PARAM_ACTION_ID ) ) ) { if ( 0 == $ oReviewItem -> sqlData [ 'publish' ] ) { $ this -> DeleteConnectedComments ( $ oReviewItem ) ; $ oReviewItem -> AllowEditByAll ( true ) ; $ oReviewItem -> Delete ( ) ; $ oMsgManager -> AddMessage ( self :: MSG_CONSUMER_NAME , 'ARTICLE-REVIEW-DELETE-SUCCESS' ) ; } else { $ oMsgManager -> AddMessage ( self :: MSG_CONSUMER_NAME , 'ARTICLE-REVIEW-ACTION-REVIEW-NOT-BLOCKED' ) ; } } else { $ oMsgManager -> AddMessage ( self :: MSG_CONSUMER_NAME , 'ARTICLE-REVIEW-ACTION-REVIEW-NOT-FOUND' ) ; } }
Deletes one review with valid action id.
Deletes one review with valid action id .