Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/CleantalkAntispam.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,9 @@ private function setEmailAutomatically()
public static function getFrontendHTMLCode($warn_if_js_disabled = false)
{
$warn = $warn_if_js_disabled ? '<noscript><div>Please, enable JavaScript in the browser to process the form</div></noscript>' : '';
$url = static::BOT_DETECTOR_LIBRARY_URL . '?ver=' . gmdate('Ymd');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gmdate('Ymd');

This will drop the browser cache, you can use constant APBCT_VERSION instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the remark

$html = '<script src="%s"></script>%s';
return sprintf($html, static::BOT_DETECTOR_LIBRARY_URL, $warn);
return sprintf($html, $url, $warn);
}

/**
Expand Down
Loading