function qa_limits_increment($userid, $actioncode)
{
    require_once QA_INCLUDE_DIR . 'qa-db-limits.php';
    $period = (int) (qa_opt('db_time') / 3600);
    if (isset($userid)) {
        qa_db_limits_user_add($userid, $actioncode, $period, 1);
    }
    qa_db_limits_ip_add(qa_remote_ip_address(), $actioncode, $period, 1);
}
Example #2
0
function qa_limits_increment($userid, $action)
{
    if (qa_to_override(__FUNCTION__)) {
        $args = func_get_args();
        return qa_call_override(__FUNCTION__, $args);
    }
    require_once QA_INCLUDE_DIR . 'qa-db-limits.php';
    $period = (int) (qa_opt('db_time') / 3600);
    if (isset($userid)) {
        qa_db_limits_user_add($userid, $action, $period, 1);
    }
    qa_db_limits_ip_add(qa_remote_ip_address(), $action, $period, 1);
}