diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2018-10-05 18:54:48 +0300 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2018-10-05 18:54:48 +0300 |
commit | 28fc7b50610dfc238d0deb065d8d90a3fd56969e (patch) | |
tree | a001d40dd2336b0b86ec08fc467136a1375f920e /apps | |
parent | 37ae5cb1009ca92a8e55f8ac7146eeef10c6c9fc (diff) |
Ignore case for is and !is
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/workflowengine/lib/Check/FileName.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/workflowengine/lib/Check/FileName.php b/apps/workflowengine/lib/Check/FileName.php index e335e31c3ea..c6afbf7afad 100644 --- a/apps/workflowengine/lib/Check/FileName.php +++ b/apps/workflowengine/lib/Check/FileName.php @@ -59,15 +59,20 @@ class FileName extends AbstractStringCheck { * @return string */ protected function getActualValue(): string { - return mb_strtolower(basename($this->path)); + return basename($this->path); } /** * @param string $operator - * @param string $value + * @param string $checkValue + * @param string $actualValue * @return bool */ - public function executeCheck($operator, $value): bool { - return parent::executeCheck($operator, mb_strtolower($value)); + protected function executeStringCheck($operator, $checkValue, $actualValue): bool { + if ($operator === 'is' || $operator === '!is') { + $checkValue = mb_strtolower($checkValue); + $actualValue = mb_strtolower($actualValue); + } + return parent::executeStringCheck($operator, $checkValue, $actualValue); } } |