19 Commits

Author SHA1 Message Date
David Mudrák
ade03c067a MDL-52214 core: Fix case sensitivity in user agent comparison
The previous 2.9 implementation of is_web_crawler() used stripos() in
certain cases. The unit tests re-added in the previous commit revealed
that certain crawlers (such as BaiDuSpider) were not correctly detected
in the new refactored implementation.

It seems lesser evil and safe enough to use /i in the regex search even
though it is not 100% same logic as before - as stripos() was used in
some cases only, not always.
2015-11-23 09:44:43 +01:00
Andrew Nicols
39a731efb4 MDL-51737 core: Add Edge UserAgent support 2015-10-22 08:37:27 +08:00
Andrew Nicols
34c6ec1869 MDL-50891 useragent: Move web crawler checks to useragent class 2015-08-28 14:31:51 +08:00
Andrew Nicols
96a5463119 MDL-48685 core_useragent: Correct IE 5.0 issues 2015-01-27 08:36:20 +08:00
Frederic Massart
d2fdad7c6c MDL-43679 core: Handle Meridio user agents with MS Word 2015-01-02 11:22:47 +08:00
Paul Nicholls
ff0e78e672 MDL-43679 core_useragent: add basic MS Word detection
Basic detection for MS Word's internal link checker.  This is not perfect,
as older versions use IE6/7 user agent string with no identifying marks,
and newer versions don't necessarily identify themselves as Word (just as
Office).  Version information is not reliably available, even when there
is sufficient other information to identify it as Word's link checker.
This is also based on a small sample of Word / OS version pairings, so
there may be some which are identifiable but not currently covered.
2015-01-02 10:54:52 +08:00
BKelada
8ce30abf5b MDL-44829 libraries: Update android user agent detection 2014-12-17 16:10:24 +11:00
Jenny Gray
d6bc210687 MDL-45846 Libraries custom user agent device detection unit test added 2014-06-09 13:56:42 +01:00
Jenny Gray
ccbb60d188 MDL-45846 Libraries Reinstate custom user agent device detection 2014-06-06 09:10:32 +01:00
Marina Glancy
e762d5a7f2 Merge branch 'm27_MDL-43082_IE9_Compat_View_SVG_Say_No' of https://github.com/scara/moodle 2013-12-10 14:47:08 +11:00
Matteo Scaramuccia
aea486c8d5 MDL-43159 Libraries Wrong naming convention in $compat_view. 2013-12-05 16:06:54 +01:00
Matteo Scaramuccia
657a94fcfd MDL-43082 Themes IE 9 Compatibility View doesn't support SVG. 2013-12-05 15:55:17 +01:00
Matteo Scaramuccia
bc242bbda5 MDL-39810 Files: IE doesn't recognize JSON MIME Type (RFC4627).
Affected versions:
- IE 8+, under Compatibility View.
2013-10-28 23:34:35 +01:00
Michael de Raadt
a6989aa6e9 MDL-42491 libraries: add exception for IE11 (and hopefully later versions) 2013-10-25 09:24:47 +08:00
Dan Poltawski
378b3eac83 MDL-36316 useragent: Reduce user agent sniffing
* core_useragent: Introduce is_vendor methods to improve readability
  when we are just detecting if a browser is from a vendor, rather than
  the exact version

* Remove uncessary browser version checks when we are just detecting
  vendors - this makes the intention of our sniffing clearer.

* Remove sniffing for browsers which we do not support, grades/ajax/tinymce
  all support modern browsers so there is no need to sniff for them.
2013-09-13 14:25:37 +08:00
Sam Hemelryk
c3d2fbf9cd MDL-40931 useragent: separated user agent functionality into a lib
This commit moves user agent related functionality out of several
core libraries and combines it into a more manageable class.
All core uses are converted and functions deprecated in favor
of the new class.
2013-08-26 13:59:19 +12:00
Damyon Wiese
9ead041cdb Revert "MDL-40931 useragent: separated user agent functionality into a lib"
This reverts commit af62237d0e6e27df868d50848f7098f57c103f86.
This reverts commit 87a4194fdcd322d4aee5a6207b55a8da0864da94.
This reverts commit b2c66eb60c01805f26cc791966f05be52af7b406.

Conflicts:

	version.php
2013-08-22 13:31:25 +08:00
Damyon Wiese
b2c66eb60c MDL-40931 useragentlib: Removed unused class variable + version fix 2013-08-20 16:48:18 +08:00
Sam Hemelryk
af62237d0e MDL-40931 useragent: separated user agent functionality into a lib
This commit moves user agent related functionality out of several
core libraries and combines it into a more manageable class.
All core uses are converted and functions deprecated in favor
of the new class.
2013-08-16 09:02:01 +12:00