View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000940 | OXID eShop (all versions) | 1.01. Products (product, categories, manufacturer, promotions etc.) | public | 2009-05-26 14:40 | 2012-12-07 14:23 |
Reporter | juergen_busch | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.1.2 revision 18998 | ||||
Fixed in Version | 4.1.5 revision 21618 | ||||
Summary | 0000940: Bug in function oxrating::allowRating | ||||
Description | Function oxrating::allowRating seems to delete not only the rating of one user. It seems to delete all ratings of all users when ratings are 'old enough' to fulfill the deleting criteria. | ||||
Additional Information | Bug is reported by Frank Knapp, eSales International Inc. via Technical Support. Customer: high-feelings.de Because problem is difficult to descripe in detail here is a fix for it. New: oxuserid = '$sUserId' and oxtype='$sType' and oxobjectid = '$sObjectId' in delete statement. public function allowRating( $sUserId, $sType, $sObjectId) { $oDB = oxDb::getDb(); $myConfig = $this->getConfig(); if ( $iRatingLogsTimeout = $myConfig->getConfigParam( 'iRatingLogsTimeout' ) ) { $sExpDate = date( 'Y-m-d H:i:s', oxUtilsDate::getInstance()->getTime() - $iRatingLogsTimeout*24*60*60); $oDB->execute( "delete from oxratings where oxuserid = '$sUserId' and oxtype='$sType' and oxobjectid = '$sObjectId' and oxtimestamp < '$sExpDate'" ); } $sSelect = "select oxid from oxratings where oxuserid = '$sUserId' and oxtype='$sType' and oxobjectid = '$sObjectId'"; if ( $oDB->getOne( $sSelect ) ) { return false; } return true; } | ||||
Tags | Ratings, Reviews | ||||
Theme | |||||
Browser | All | ||||
PHP Version | 5.2.6 | ||||
Database Version | 5.0.33 | ||||
|
The initial problem was, that the Label of this option was changed incorrectly and changed the meaning of related functionality, when the source code still works according previous meaning. Pls rename this option to: DE “Wie lange Artikel-Bewertungen gespeichert werden (in Tagen)” EN: „How long product ratings are stored (in days)“ |
|
text changes |