109 if ($this->_blShowLogin) {
126 if ($this->_aSortColumns === null) {
160 if ($this->_aEntries === null) {
161 $this->_aEntries =
false;
162 $iNrofCatArticles = (int) $this->
getConfig()->getConfigParam(
'iNrofCatArticles');
163 $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 10;
167 $oEntries =
oxNew(
'oxgbentry');
168 if ($iCnt = $oEntries->getEntryCount()) {
169 $this->_iCntPages = round($iCnt / $iNrofCatArticles + 0.49);
170 $this->_aEntries = $oEntries->getAllEntries(
188 if ($this->_blFloodProtection === null) {
189 $this->_blFloodProtection =
false;
192 $sUserId = $sUserId ? $sUserId : 0;
194 $oEntries =
oxNew(
'oxgbentry');
195 $this->_blFloodProtection = $oEntries->floodProtection($this->
getConfig()->getShopId(), $sUserId);
238 $aSorting = array(
'sortby' =>
'date',
'sortdir' =>
'desc');
250 if ($this->_oPageNavigation === null) {
251 $this->_oPageNavigation =
false;
272 $sShopId = $this->
getConfig()->getShopId();
278 $oUtilsView->addErrorToDisplay(
'ERROR_MESSAGE_GUESTBOOK_ENTRY_ERR_LOGIN_TO_WRITE_ENTRY');
285 $oUtilsView->addErrorToDisplay(
'ERROR_MESSAGE_GUESTBOOK_ENTRY_ERR_UNDEFINED_SHOP');
287 return 'guestbookentry';
291 if (
'' == $sReviewText) {
292 $oUtilsView->addErrorToDisplay(
'ERROR_MESSAGE_GUESTBOOK_ENTRY_ERR_REVIEW_CONTAINS_NO_TEXT');
298 $oEntrie =
oxNew(
'oxgbentry');
299 if ($oEntrie->floodProtection($sShopId, $sUserId)) {
300 $oUtilsView->addErrorToDisplay(
'ERROR_MESSAGE_GUESTBOOK_ENTRY_ERR_MAXIMUM_NUMBER_EXCEEDED');
302 return 'guestbookentry';
308 $oEntry =
oxNew(
'oxgbentry');
309 $oEntry->oxgbentries__oxshopid =
new oxField($sShopId);
310 $oEntry->oxgbentries__oxuserid =
new oxField($sUserId);
311 $oEntry->oxgbentries__oxcontent =
new oxField($sReviewText);
329 $aPath[
'title'] =
oxRegistry::getLang()->translateString(
'GUESTBOOK', $iBaseLanguage,
false);
330 $aPath[
'link'] = $this->
getLink();