src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php
public function EditReview()
    {
        $oGlobal = TGlobal::instance();
        $oMsgManager = TCMSMessageManager::GetInstance();
        if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_REVIEW_ID) && $oGlobal->UserDataExists(TdbShopArticleReview::INPUT_BASE_NAME)) {
            $oEditReview = TdbShopArticleReview::GetNewInstance();
            if ($oEditReview->Load($oGlobal->GetUserData(TdbShopArticleReview::URL_PARAM_REVIEW_ID))) {
                $aUserData = $oGlobal->GetuserData(TdbShopArticleReview::INPUT_BASE_NAME);
                foreach ($aUserData as $sKey => $sValue) {
                    $oEditReview->sqlData[$sKey] = $sValue;
                }
                if ($this->ValidateWriteReviewData($oEditReview->sqlData)) {
                    $oEditReview->AllowEditByAll(true);
                    $oEditReview->Save();
                    $oMsgManager->AddMessage(self::MSG_CONSUMER_NAME, 'ARTICLE-REVIEW-EDIT-REVIEW-SUCCESS');
                }
            } else {
                $oMsgManager->AddMessage(self::MSG_CONSUMER_NAME, 'ARTICLE-REVIEW-ACTION-REVIEW-NOT-FOUND');
            }
        } else {
            $oMsgManager->AddMessage(self::MSG_CONSUMER_NAME, 'ARTICLE-REVIEW-ACTION-MISSING-PARAMETER');
        }
    }
public function EditReview()
    {
        $oGlobal = TGlobal::instance();
        $oMsgManager = TCMSMessageManager::GetInstance();
        if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_REVIEW_ID) && $oGlobal->UserDataExists(TdbShopArticleReview::INPUT_BASE_NAME)) {
            $oEditReview = TdbShopArticleReview::GetNewInstance();
            if ($oEditReview->Load($oGlobal->GetUserData(TdbShopArticleReview::URL_PARAM_REVIEW_ID))) {
                $aUserData = $oGlobal->GetuserData(TdbShopArticleReview::INPUT_BASE_NAME);
                foreach ($aUserData as $sKey => $sValue) {
                    $oEditReview->sqlData[$sKey] = $sValue;
                }
                if ($this->ValidateWriteReviewData($oEditReview->sqlData)) {
                    $oEditReview->AllowEditByAll(true);
                    $oEditReview->Save();
                    $oMsgManager->AddMessage(self::MSG_CONSUMER_NAME, 'ARTICLE-REVIEW-EDIT-REVIEW-SUCCESS');
                }
            } else {
                $oMsgManager->AddMessage(self::MSG_CONSUMER_NAME, 'ARTICLE-REVIEW-ACTION-REVIEW-NOT-FOUND');
            }
        } else {
            $oMsgManager->AddMessage(self::MSG_CONSUMER_NAME, 'ARTICLE-REVIEW-ACTION-MISSING-PARAMETER');
        }
    }
public function EditReview ( ) { $ oGlobal = TGlobal :: instance ( ) ; $ oMsgManager = TCMSMessageManager :: GetInstance ( ) ; if ( $ oGlobal -> UserDataExists ( TdbShopArticleReview :: URL_PARAM_REVIEW_ID ) && $ oGlobal -> UserDataExists ( TdbShopArticleReview :: INPUT_BASE_NAME ) ) { $ oEditReview = TdbShopArticleReview :: GetNewInstance ( ) ; if ( $ oEditReview -> Load ( $ oGlobal -> GetUserData ( TdbShopArticleReview :: URL_PARAM_REVIEW_ID ) ) ) { $ aUserData = $ oGlobal -> GetuserData ( TdbShopArticleReview :: INPUT_BASE_NAME ) ; foreach ( $ aUserData as $ sKey => $ sValue ) { $ oEditReview -> sqlData [ $ sKey ] = $ sValue ; } if ( $ this -> ValidateWriteReviewData ( $ oEditReview -> sqlData ) ) { $ oEditReview -> AllowEditByAll ( true ) ; $ oEditReview -> Save ( ) ; $ oMsgManager -> AddMessage ( self :: MSG_CONSUMER_NAME , 'ARTICLE-REVIEW-EDIT-REVIEW-SUCCESS' ) ; } } else { $ oMsgManager -> AddMessage ( self :: MSG_CONSUMER_NAME , 'ARTICLE-REVIEW-ACTION-REVIEW-NOT-FOUND' ) ; } } else { $ oMsgManager -> AddMessage ( self :: MSG_CONSUMER_NAME , 'ARTICLE-REVIEW-ACTION-MISSING-PARAMETER' ) ; } }
Edit one review.
Edit one review .