Quarantine abuse
Posted: 23 April 2008 04:53 PM   [ Ignore ]
Newbie
Rank
Total Posts:  4
Joined  2008-01-23

I’ve gotten a few users who abuse the quarantine system.  I had one guy create a script that would look through all the ratings and quarantine all of them, regardless of how many flags i set the system to.

So I developed a fix.  Maybe you guys can apply this to your system, or tweak it a bit in a future version so you can limit the amount of quarantine’s a user can submit.

Anyway here is the fix.

in mod.rating.php

under functions

function quarantine_allowed()

and

function quarantine()

add

// ----------------------------------------
  //  Rating already quarantined by this user
  // ----------------------------------------
  
  $query  = $DB->query( "SELECT COUNT(*) AS count FROM exp_rating_quarantine WHERE rating_id = '".$rating_id."' AND member_id = '" . $SESS->userdata['member_id'] . "'" );
  
  if (
$query->row['count'] != 0 )
  
{
   
return $this->_parse_template( FALSE, $LANG->line('rating_already_quarantined') );
  
}

Profile
 
 
Posted: 24 April 2008 07:05 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  1685
Joined  2006-10-18

Thank you nVaux! smile
I’ll queue this one up smile

 Signature 
Profile
 
 
Posted: 13 May 2008 08:30 AM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
Rank
Total Posts:  5
Joined  2005-08-19

This has been added to the next version.

Profile