95 if ( $this->_blShowLogin ) {
111 if ( $this->_aSortColumns === null) {
144 if ( $this->_aEntries === null) {
145 $this->_aEntries =
false;
146 $iNrofCatArticles = (int) $this->
getConfig()->getConfigParam(
'iNrofCatArticles' );
147 $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 10;
150 $oEntries =
oxNew(
'oxgbentry' );
151 if ( $iCnt = $oEntries->getEntryCount() ) {
152 $this->_iCntPages = round( $iCnt / $iNrofCatArticles + 0.49 );
167 if ( $this->_blFloodProtection === null ) {
168 $this->_blFloodProtection =
false;
171 $sUserId = $sUserId ? $sUserId : 0;
173 $oEntries =
oxNew(
'oxgbentry' );
174 $this->_blFloodProtection = $oEntries->floodProtection( $this->
getConfig()->getShopId(), $sUserId );
216 $aSorting = array (
'sortby' =>
'date',
'sortdir' =>
'desc' );
239 $this->_aSortColumns = array(
'author',
'date' );
244 if ( !$sSortBy && $aSorting = $this->
getSorting(
'oxgb' ) ) {
245 $sSortBy = $aSorting[
'sortby'];
246 $sSortDir = $aSorting[
'sortdir'];
258 $this->_sListOrderBy = $sSortBy;
259 $this->_sListOrderDir = $sSortDir;
273 if ( $this->_oPageNavigation === null ) {
274 $this->_oPageNavigation =
false;
294 $sShopId = $this->
getConfig()->getShopId();
299 oxRegistry::get(
"oxUtilsView")->addErrorToDisplay(
'ERROR_MESSAGE_GUESTBOOK_ENTRY_ERR_LOGIN_TO_WRITE_ENTRY' );
305 oxRegistry::get(
"oxUtilsView")->addErrorToDisplay(
'ERROR_MESSAGE_GUESTBOOK_ENTRY_ERR_UNDEFINED_SHOP' );
306 return 'guestbookentry';
310 if (
'' == $sReviewText ) {
311 oxRegistry::get(
"oxUtilsView")->addErrorToDisplay(
'ERROR_MESSAGE_GUESTBOOK_ENTRY_ERR_REVIEW_CONTAINS_NO_TEXT' );
316 $oEntrie =
oxNew(
'oxgbentry' );
317 if ( $oEntrie->floodProtection( $sShopId, $sUserId ) ) {
318 oxRegistry::get(
"oxUtilsView")->addErrorToDisplay(
'ERROR_MESSAGE_GUESTBOOK_ENTRY_ERR_MAXIMUM_NUMBER_EXCEEDED' );
319 return 'guestbookentry';
325 $oEntry =
oxNew(
'oxgbentry' );
326 $oEntry->oxgbentries__oxshopid =
new oxField($sShopId);
327 $oEntry->oxgbentries__oxuserid =
new oxField($sUserId);
328 $oEntry->oxgbentries__oxcontent =
new oxField($sReviewText);
346 $aPath[
'link'] = $this->
getLink();