Skip to content

Commit

Permalink
Revert formatting changes
Browse files Browse the repository at this point in the history
lbartoli79 committed Dec 6, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent bf0f790 commit a188ff8
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions www/runtest.php
Original file line number Diff line number Diff line change
@@ -146,7 +146,7 @@
}
if (array_key_exists('resubmit', $_POST)) {
$test = GetTestInfo(trim($_POST['resubmit']));
if (array_key_exists('key', $test)) {
if (array_key_exists('key', $test)){
$test['key'] = null;
}
if ($test) {
@@ -221,7 +221,7 @@
$is_private = 0;

$is_private_api_call = !empty($user_api_key) && !empty($req_private) &&
((int)$req_private == 1 || $req_private == 'true');
((int)$req_private == 1 || $req_private == 'true');
$is_private_web_call = $isPaid && ($_POST['private'] == 'on');

if ($is_private_api_call || $is_private_web_call) {
@@ -908,7 +908,6 @@ function buildSelfHost($hosts)
$error = 'Please verify your email address to use WebPageTest.';
}


if (!strlen($error) && CheckIp($test) && CheckUrl($test['url']) && CheckRateLimit($test, $error, $errorTitle)) {
$total_runs = Util::getRunCount($test['runs'], $test['fvonly'], $test['lighthouse'], $test['type']);
$hasRunsAvailable = !is_null($request_context->getUser()) && $request_context->getUser()->hasEnoughRemainingRuns($total_runs);
@@ -1835,24 +1834,9 @@ function ValidateParameters(&$test, $locations, &$error, $destination_url = null

// make sure on/off options are explicitly 1 or 0
$values = array(
'private',
'web10',
'ignoreSSL',
'tcpdump',
'standards',
'lighthouse',
'timeline',
'swrender',
'netlog',
'spdy3',
'noscript',
'fullsizevideo',
'blockads',
'sensitive',
'pngss',
'bodies',
'htmlbody',
'pss_advanced',
'private', 'web10', 'ignoreSSL', 'tcpdump', 'standards', 'lighthouse',
'timeline', 'swrender', 'netlog', 'spdy3', 'noscript', 'fullsizevideo',
'blockads', 'sensitive', 'pngss', 'bodies', 'htmlbody', 'pss_advanced',
'noheaders'
);
foreach ($values as $value) {
@@ -3578,7 +3562,7 @@ function CheckRateLimit($test, &$error, &$errorTitle)

$errorTemplate = "<p>Don't worry! You can keep testing for free once you log in, which will give you access to other excellent features like:</p>";
$errorTitleTemplate = "You've reached the limit for";

if (!$passesMonthly) {
$errorTitle = "{$errorTitleTemplate} this month";
$error = $errorTemplate;

0 comments on commit a188ff8

Please sign in to comment.