The submit wait function should factor in per form as well.
Manual Patch
Open applications/form/sources/Log/Log.php
Find:
$messagesSentToday = \IPS\Db::i()->select( 'COUNT(*) AS count, MAX(log_date) AS max', 'form_logs', array( 'log_ip_address=? AND log_date>?', \IPS\Member::loggedIn()->ip_address, \IPS\DateTime::create()->sub( new \DateInterval( 'PT'.$submitWait.'S' ) )->getTimeStamp() ) )->first();
Replace With:
if( $container )
{
$messagesSentToday = \IPS\Db::i()->select( 'COUNT(*) AS count, MAX(log_date) AS max', 'form_logs', array( 'log_ip_address=? AND log_form_id=? AND log_date>?', \IPS\Member::loggedIn()->ip_address, $container->form_id, \IPS\DateTime::create()->sub( new \DateInterval( 'PT'.$submitWait.'S' ) )->getTimeStamp() ) )->first();
}
else
{
$messagesSentToday = \IPS\Db::i()->select( 'COUNT(*) AS count, MAX(log_date) AS max', 'form_logs', array( 'log_ip_address=? AND log_date>?', \IPS\Member::loggedIn()->ip_address, \IPS\DateTime::create()->sub( new \DateInterval( 'PT'.$submitWait.'S' ) )->getTimeStamp() ) )->first();
}
Recommended Comments
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.