summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-02-01 17:44:58 +0100
committerRobin Appelman <icewind@owncloud.com>2016-02-02 15:10:59 +0100
commitf4e1a1677ba6436f089cc8ad6aee5c06e71c4177 (patch)
treede990e79ab83f4d805c386b3eb2cb032bbeba246 /apps/files_external/lib
parent2d1d89ee29e49412192b051412755610e0538198 (diff)
downloadnextcloud-server-f4e1a1677ba6436f089cc8ad6aee5c06e71c4177.tar.gz
nextcloud-server-f4e1a1677ba6436f089cc8ad6aee5c06e71c4177.zip
Remove magic flags from files_external backend params
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r--apps/files_external/lib/definitionparameter.php26
1 files changed, 5 insertions, 21 deletions
diff --git a/apps/files_external/lib/definitionparameter.php b/apps/files_external/lib/definitionparameter.php
index dc7985837f5..27c6af0fcda 100644
--- a/apps/files_external/lib/definitionparameter.php
+++ b/apps/files_external/lib/definitionparameter.php
@@ -131,27 +131,11 @@ class DefinitionParameter implements \JsonSerializable {
* @return string
*/
public function jsonSerialize() {
- $prefix = '';
- switch ($this->getType()) {
- case self::VALUE_BOOLEAN:
- $prefix = '!';
- break;
- case self::VALUE_PASSWORD:
- $prefix = '*';
- break;
- case self::VALUE_HIDDEN:
- $prefix = '#';
- break;
- }
-
- if ($this->isFlagSet(self::FLAG_OPTIONAL)) {
- $prefix = '&' . $prefix;
- }
- if ($this->isFlagSet(self::FLAG_USER_PROVIDED)) {
- $prefix = '@' . $prefix;
- }
-
- return $prefix . $this->getText();
+ return [
+ 'value' => $this->getText(),
+ 'flags' => $this->getFlags(),
+ 'type' => $this->getType()
+ ];
}
public function isOptional() {