diff --git a/www/runtest.php b/www/runtest.php index 8b44e60568..60bf43f5a9 100644 --- a/www/runtest.php +++ b/www/runtest.php @@ -3553,11 +3553,12 @@ function CheckRateLimit($test, &$error, &$errorTitle) $cmrl = new RateLimiter($test['ip'], $monthly_limit); $passesMonthly = $cmrl->check($total_runs); - $error = "

Don't worry! You can keep testing for free once you log in, which will give you access to other excellent features like:

"; + $errorTemplate = "

Don't worry! You can keep testing for free once you log in, which will give you access to other excellent features like:

"; $errorTitleTemplate = "You've reached the limit for"; if (!$passesMonthly) { $errorTitle = "{$errorTitleTemplate} this month"; + $error = $errorTemplate; $error .= << var intervalId = setInterval(function () { @@ -3585,6 +3586,7 @@ function CheckRateLimit($test, &$error, &$errorTitle) $count += $total_runs; Cache::store($cache_key, $count, 1800); } else { + $error = $errorTemplate; $errorTitle = "{$errorTitleTemplate} this month"; $error .= <<