summaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/lib/Check/RequestUserAgent.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/workflowengine/lib/Check/RequestUserAgent.php')
-rw-r--r--apps/workflowengine/lib/Check/RequestUserAgent.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/workflowengine/lib/Check/RequestUserAgent.php b/apps/workflowengine/lib/Check/RequestUserAgent.php
index 7a8d4a71acf..4191a2f3412 100644
--- a/apps/workflowengine/lib/Check/RequestUserAgent.php
+++ b/apps/workflowengine/lib/Check/RequestUserAgent.php
@@ -44,9 +44,9 @@ class RequestUserAgent extends AbstractStringCheck {
* @param string $value
* @return bool
*/
- public function executeCheck($operator, $value) {
+ public function executeCheck($operator, $value) {
$actualValue = $this->getActualValue();
- if (in_array($operator, ['is', '!is'])) {
+ if (in_array($operator, ['is', '!is'], true)) {
switch ($value) {
case 'android':
$operator = $operator === 'is' ? 'matches' : '!matches';
@@ -60,6 +60,14 @@ class RequestUserAgent extends AbstractStringCheck {
$operator = $operator === 'is' ? 'matches' : '!matches';
$value = IRequest::USER_AGENT_CLIENT_DESKTOP;
break;
+ case 'mail':
+ if ($operator === 'is') {
+ return $this->executeStringCheck('matches', IRequest::USER_AGENT_OUTLOOK_ADDON, $actualValue)
+ || $this->executeStringCheck('matches', IRequest::USER_AGENT_THUNDERBIRD_ADDON, $actualValue);
+ }
+
+ return $this->executeStringCheck('!matches', IRequest::USER_AGENT_OUTLOOK_ADDON, $actualValue)
+ && $this->executeStringCheck('!matches', IRequest::USER_AGENT_THUNDERBIRD_ADDON, $actualValue);
}
}
return $this->executeStringCheck($operator, $value, $actualValue);