Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2018-10-05 18:54:48 +0300
committerDaniel Kesselberg <mail@danielkesselberg.de>2018-10-05 18:54:48 +0300
commit28fc7b50610dfc238d0deb065d8d90a3fd56969e (patch)
treea001d40dd2336b0b86ec08fc467136a1375f920e
parent37ae5cb1009ca92a8e55f8ac7146eeef10c6c9fc (diff)
Ignore case for is and !is
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
-rw-r--r--apps/workflowengine/lib/Check/FileName.php13
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);
}
}