MDL-43679 core: Handle Meridio user agents with MS Word

This commit is contained in:
Frederic Massart
2015-01-02 11:24:00 +08:00
parent e618263437
commit b4e7dcaa8a
2 changed files with 32 additions and 3 deletions
+4 -3
View File
@@ -818,11 +818,12 @@ class core_useragent {
$useragent = self::get_user_agent_string();
if (!preg_match('/(\bWord\b|ms-office|MSOffice|Microsoft Office)/i', $useragent)) {
return false;
}
if (strpos($useragent, 'Outlook') !== false) {
} else if (strpos($useragent, 'Outlook') !== false) {
return false;
} else if (strpos($useragent, 'Meridio') !== false) {
return false;
}
// It's Office and not Outlook - so it's probably Word, but we can't really be sure in most cases.
// It's Office, not Outlook and not Meridio - so it's probably Word, but we can't really be sure in most cases.
return true;
}