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:
authorJoas Schilling <coding@schilljs.com>2019-12-13 00:19:53 +0300
committerBackportbot <backportbot-noreply@rullzer.com>2019-12-13 01:05:18 +0300
commit42a51146d1b353f4e5eaf5bd8132047a668ab6c3 (patch)
treec034cc9f9ffbc457879d94f4217e1e8e68cb3494
parentc743af30d6dd5b76f42f8dc76a23ccfacf494352 (diff)
Allow to specify apps that somethign is a dir
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--apps/workflowengine/lib/Check/AbstractStringCheck.php3
-rw-r--r--apps/workflowengine/lib/Check/FileMimeType.php10
-rw-r--r--apps/workflowengine/lib/Check/FileName.php3
-rw-r--r--apps/workflowengine/lib/Check/FileSize.php3
-rw-r--r--apps/workflowengine/lib/Check/FileSystemTags.php3
-rw-r--r--apps/workflowengine/lib/Check/RequestRemoteAddress.php3
-rw-r--r--apps/workflowengine/lib/Check/RequestTime.php3
-rw-r--r--apps/workflowengine/lib/Check/UserGroupMembership.php3
-rw-r--r--lib/public/WorkflowEngine/ICheck.php3
9 files changed, 24 insertions, 10 deletions
diff --git a/apps/workflowengine/lib/Check/AbstractStringCheck.php b/apps/workflowengine/lib/Check/AbstractStringCheck.php
index 0fd728e3496..8ea987c1e52 100644
--- a/apps/workflowengine/lib/Check/AbstractStringCheck.php
+++ b/apps/workflowengine/lib/Check/AbstractStringCheck.php
@@ -44,8 +44,9 @@ abstract class AbstractStringCheck implements ICheck {
/**
* @param IStorage $storage
* @param string $path
+ * @param bool $isDir
*/
- public function setFileInfo(IStorage $storage, $path) {
+ public function setFileInfo(IStorage $storage, $path, $isDir = false) {
// Nothing changes here with a different path
}
diff --git a/apps/workflowengine/lib/Check/FileMimeType.php b/apps/workflowengine/lib/Check/FileMimeType.php
index 0a2f33dd626..b3955fbd38b 100644
--- a/apps/workflowengine/lib/Check/FileMimeType.php
+++ b/apps/workflowengine/lib/Check/FileMimeType.php
@@ -58,13 +58,19 @@ class FileMimeType extends AbstractStringCheck {
/**
* @param IStorage $storage
* @param string $path
+ * @param bool $isDir
*/
- public function setFileInfo(IStorage $storage, $path) {
+ public function setFileInfo(IStorage $storage, $path, $isDir = false) {
$this->storage = $storage;
$this->path = $path;
if (!isset($this->mimeType[$this->storage->getId()][$this->path])
|| $this->mimeType[$this->storage->getId()][$this->path] === '') {
- $this->mimeType[$this->storage->getId()][$this->path] = null;
+
+ if ($isDir) {
+ $this->mimeType[$this->storage->getId()][$this->path] = 'httpd/unix-directory';
+ } else {
+ $this->mimeType[$this->storage->getId()][$this->path] = null;
+ }
}
}
diff --git a/apps/workflowengine/lib/Check/FileName.php b/apps/workflowengine/lib/Check/FileName.php
index f775227f71c..4cb402f73d9 100644
--- a/apps/workflowengine/lib/Check/FileName.php
+++ b/apps/workflowengine/lib/Check/FileName.php
@@ -49,8 +49,9 @@ class FileName extends AbstractStringCheck {
/**
* @param IStorage $storage
* @param string $path
+ * @param bool $isDir
*/
- public function setFileInfo(IStorage $storage, $path) {
+ public function setFileInfo(IStorage $storage, $path, $isDir = false) {
$this->storage = $storage;
$this->path = $path;
}
diff --git a/apps/workflowengine/lib/Check/FileSize.php b/apps/workflowengine/lib/Check/FileSize.php
index 7e48f0f6038..76470c73f61 100644
--- a/apps/workflowengine/lib/Check/FileSize.php
+++ b/apps/workflowengine/lib/Check/FileSize.php
@@ -51,8 +51,9 @@ class FileSize implements ICheck {
/**
* @param IStorage $storage
* @param string $path
+ * @param bool $isDir
*/
- public function setFileInfo(IStorage $storage, $path) {
+ public function setFileInfo(IStorage $storage, $path, $isDir = false) {
}
/**
diff --git a/apps/workflowengine/lib/Check/FileSystemTags.php b/apps/workflowengine/lib/Check/FileSystemTags.php
index 4a2b87fd53e..1def0d65aad 100644
--- a/apps/workflowengine/lib/Check/FileSystemTags.php
+++ b/apps/workflowengine/lib/Check/FileSystemTags.php
@@ -68,8 +68,9 @@ class FileSystemTags implements ICheck {
/**
* @param IStorage $storage
* @param string $path
+ * @param bool $isDir
*/
- public function setFileInfo(IStorage $storage, $path) {
+ public function setFileInfo(IStorage $storage, $path, $isDir = false) {
$this->storage = $storage;
$this->path = $path;
}
diff --git a/apps/workflowengine/lib/Check/RequestRemoteAddress.php b/apps/workflowengine/lib/Check/RequestRemoteAddress.php
index 6fa4cfc8800..11b0c6d234d 100644
--- a/apps/workflowengine/lib/Check/RequestRemoteAddress.php
+++ b/apps/workflowengine/lib/Check/RequestRemoteAddress.php
@@ -47,8 +47,9 @@ class RequestRemoteAddress implements ICheck {
/**
* @param IStorage $storage
* @param string $path
+ * @param bool $isDir
*/
- public function setFileInfo(IStorage $storage, $path) {
+ public function setFileInfo(IStorage $storage, $path, $isDir = false) {
// A different path doesn't change time, so nothing to do here.
}
diff --git a/apps/workflowengine/lib/Check/RequestTime.php b/apps/workflowengine/lib/Check/RequestTime.php
index 2aa79e77673..d596b4d52d5 100644
--- a/apps/workflowengine/lib/Check/RequestTime.php
+++ b/apps/workflowengine/lib/Check/RequestTime.php
@@ -52,8 +52,9 @@ class RequestTime implements ICheck {
/**
* @param IStorage $storage
* @param string $path
+ * @param bool $isDir
*/
- public function setFileInfo(IStorage $storage, $path) {
+ public function setFileInfo(IStorage $storage, $path, $isDir = false) {
// A different path doesn't change time, so nothing to do here.
}
diff --git a/apps/workflowengine/lib/Check/UserGroupMembership.php b/apps/workflowengine/lib/Check/UserGroupMembership.php
index fd6ba00d092..32f4a2c9f64 100644
--- a/apps/workflowengine/lib/Check/UserGroupMembership.php
+++ b/apps/workflowengine/lib/Check/UserGroupMembership.php
@@ -60,8 +60,9 @@ class UserGroupMembership implements ICheck {
/**
* @param IStorage $storage
* @param string $path
+ * @param bool $isDir
*/
- public function setFileInfo(IStorage $storage, $path) {
+ public function setFileInfo(IStorage $storage, $path, $isDir = false) {
// A different path doesn't change group memberships, so nothing to do here.
}
diff --git a/lib/public/WorkflowEngine/ICheck.php b/lib/public/WorkflowEngine/ICheck.php
index 1d4fc966460..e5d3f79dbd7 100644
--- a/lib/public/WorkflowEngine/ICheck.php
+++ b/lib/public/WorkflowEngine/ICheck.php
@@ -36,9 +36,10 @@ interface ICheck {
/**
* @param IStorage $storage
* @param string $path
+ * @param bool $isDir
* @since 9.1
*/
- public function setFileInfo(IStorage $storage, $path);
+ public function setFileInfo(IStorage $storage, $path, $isDir = false);
/**
* @param string $operator