SproutCMS

This is the code documentation for the SproutCMS project

function checkInsertRate()

Attempts to put the handbrake on a script which is doing malicious inserts to the database

Usage

bool Sprout::checkInsertRate ( string $table , string $column , string $value , string $limit [, string $time , array $conds ] );

Arguments

  1. string $table
    The table name, not prefixed
  2. string $column
    The column to check
  3. string $value
    The value to check
  4. string $limit
    The number of inserts allowed in the provided time
  5. string $time = 3600
    The amount of time the limit applies for, in seconds. Default = 1 hour
  6. array $conds
    Additional conditions for the WHERE clause, formatted as per Pdb::buildClause

Return value

  • bool
    True if the insert rate is OK