Index: trunk/kernel/include/item.php =================================================================== diff -u -r1067 -r1099 --- trunk/kernel/include/item.php (.../item.php) (revision 1067) +++ trunk/kernel/include/item.php (.../item.php) (revision 1099) @@ -470,7 +470,7 @@ { $count = 0; $id = $this->Get("ResourceId"); - $sql = "SELECT count(*) as DupCount FROM ItemRating WHERE IPAddress='$ip' and ItemId=$id"; + $sql = "SELECT count(*) as DupCount FROM ".GetTablePrefix()."ItemRating WHERE IPAddress='$ip' and ItemId=$id"; $adodbConnection = &GetADODBConnection(); $rs = $adodbConnection->Execute($sql); if($rs) @@ -486,7 +486,7 @@ global $objConfig; $expired=time()-86400*$objConfig->Get("Timeout_Rating"); - $query="DELETE FROM ItemRating WHERE CreatedOn<$expired"; + $query="DELETE FROM ".GetTablePrefix()."ItemRating WHERE CreatedOn<$expired"; $this->adodbConnection->Execute($query); } Index: trunk/kernel/include/parseditem.php =================================================================== diff -u -r1080 -r1099 --- trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 1080) +++ trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 1099) @@ -2566,7 +2566,7 @@ $catid = (int)getArrayValue($attribs,'_catid'); $scope = (int)getArrayValue($attribs,'_scope'); - $show_since_last = (int)$attribs["_show_since_last"]; + $show_since_last = (int)getArrayValue($attribs,'_show_since_last'); //$JoinCats = (int)$attribs["_catinfo"] || $scope; //echo "Last: $scope

"; $TableName = $this->SourceTable; Index: trunk/kernel/parser.php =================================================================== diff -u -r1086 -r1099 --- trunk/kernel/parser.php (.../parser.php) (revision 1086) +++ trunk/kernel/parser.php (.../parser.php) (revision 1099) @@ -2476,7 +2476,7 @@ $count++; } - if(!$hasperm && $attribs["_system"]) + if( !$hasperm && getArrayValue($attribs,'_system') ) { for($x=0; $xclsItemDB(); $this->tablename = GetTablePrefix()."ItemRating"; $this->id_field = "RatingId"; + $this->NoResourceId=1; $this->type=-10; if($RatingId!=NULL) $this->LoadFromDatabase($RatingId); @@ -53,7 +54,7 @@ $this->Set("CreatedOn",adodb_date("U")); $this->Set("IPAddress",$REMOTE_ADDR); - if(ip_exists($this->Get("IPAddress"),$this->Get("ItemId"),$this->SourceTable)) + if(ip_exists($this->Get("IPAddress"),$this->Get("ItemId"),$this->tablename)) { //$Errors->AddError("error.already_rated","","","","clsItemRating","Create"); return false;