107 if ($this->_blShowLogin) {
124 if ($this->_aSortColumns === null) {
158 if ($this->_aEntries === null) {
159 $this->_aEntries =
false;
160 $iNrofCatArticles = (int) $this->
getConfig()->getConfigParam(
'iNrofCatArticles');
161 $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 10;
165 $oEntries =
oxNew(
'oxgbentry');
166 if ($iCnt = $oEntries->getEntryCount()) {
167 $this->_iCntPages = round($iCnt / $iNrofCatArticles + 0.49);
168 $this->_aEntries = $oEntries->getAllEntries(
186 if ($this->_blFloodProtection === null) {
187 $this->_blFloodProtection =
false;
190 $sUserId = $sUserId ? $sUserId : 0;
192 $oEntries =
oxNew(
'oxgbentry');
193 $this->_blFloodProtection = $oEntries->floodProtection($this->
getConfig()->getShopId(), $sUserId);
236 $aSorting = array(
'sortby' =>
'date',
'sortdir' =>
'desc');
248 if ($this->_oPageNavigation === null) {
249 $this->_oPageNavigation =
false;
270 $sShopId = $this->
getConfig()->getShopId();
276 $oUtilsView->addErrorToDisplay(
'ERROR_MESSAGE_GUESTBOOK_ENTRY_ERR_LOGIN_TO_WRITE_ENTRY');
283 $oUtilsView->addErrorToDisplay(
'ERROR_MESSAGE_GUESTBOOK_ENTRY_ERR_UNDEFINED_SHOP');
285 return 'guestbookentry';
289 if (
'' == $sReviewText) {
290 $oUtilsView->addErrorToDisplay(
'ERROR_MESSAGE_GUESTBOOK_ENTRY_ERR_REVIEW_CONTAINS_NO_TEXT');
296 $oEntrie =
oxNew(
'oxgbentry');
297 if ($oEntrie->floodProtection($sShopId, $sUserId)) {
298 $oUtilsView->addErrorToDisplay(
'ERROR_MESSAGE_GUESTBOOK_ENTRY_ERR_MAXIMUM_NUMBER_EXCEEDED');
300 return 'guestbookentry';
306 $oEntry =
oxNew(
'oxgbentry');
307 $oEntry->oxgbentries__oxshopid =
new oxField($sShopId);
308 $oEntry->oxgbentries__oxuserid =
new oxField($sUserId);
309 $oEntry->oxgbentries__oxcontent =
new oxField($sReviewText);
327 $aPath[
'title'] =
oxRegistry::getLang()->translateString(
'GUESTBOOK', $iBaseLanguage,
false);
328 $aPath[
'link'] = $this->
getLink();