35 $sShopId = $this->
getConfig()->getShopId();
40 oxRegistry::get(
"oxUtilsView")->addErrorToDisplay(
'ERROR_MESSAGE_GUESTBOOK_ENTRY_ERR_LOGIN_TO_WRITE_ENTRY' );
46 oxRegistry::get(
"oxUtilsView")->addErrorToDisplay(
'ERROR_MESSAGE_GUESTBOOK_ENTRY_ERR_UNDEFINED_SHOP' );
47 return 'guestbookentry';
51 if (
'' == $sReviewText ) {
52 oxRegistry::get(
"oxUtilsView")->addErrorToDisplay(
'ERROR_MESSAGE_GUESTBOOK_ENTRY_ERR_REVIEW_CONTAINS_NO_TEXT' );
53 return 'guestbookentry';
57 $oEntrie =
oxNew(
'oxgbentry' );
58 if ( $oEntrie->floodProtection( $sShopId, $sUserId ) ) {
59 oxRegistry::get(
"oxUtilsView")->addErrorToDisplay(
'ERROR_MESSAGE_GUESTBOOK_ENTRY_ERR_MAXIMUM_NUMBER_EXCEEDED' );
60 return 'guestbookentry';
66 $oEntry =
oxNew(
'oxgbentry' );
67 $oEntry->oxgbentries__oxshopid =
new oxField($sShopId);
68 $oEntry->oxgbentries__oxuserid =
new oxField($sUserId);
69 $oEntry->oxgbentries__oxcontent =
new oxField($sReviewText);