User tests: Successful: Unsuccessful:
Now uses strpos instead of preg_match.
In isRobot() use strpos() instead of preg_match() as that is faster.
See https://www.php.net/manual/en/function.preg-match.php#refsect1-function.preg-match-notes
A simply test available in this plugin.
bfisrobottest.zip
Install and on enabling the front-end displays the following on success:
Test (false):
Test (true):1
Test (true):1
Robots detected.
Robots detected.
Its a big list of robots - possibly a detectable performance improvement,
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
PR-4.4-dev
|
Please rebase for v5.1 as this is B/C break when extending the Browser class, and using $robots in it. Thanks.
I have tested this item ✅ successfully on 932b5cf
I have tested this item ✅ successfully on 932b5cf
The PR needs to be rebased, so I can't set RTC. See previous comment #42474 (comment) .
If we don't use already a 3rd party library to maintain our browser detection we should do this, for example https://github.com/hisorange/browser-detect (just the first I found not validated if it's useful)
Title |
|
Lines 87, 95, 166, 250, 268, 391 should be changed.