diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-02-01 17:44:58 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-02-02 15:10:59 +0100 |
commit | f4e1a1677ba6436f089cc8ad6aee5c06e71c4177 (patch) | |
tree | de990e79ab83f4d805c386b3eb2cb032bbeba246 /apps/files_external/lib | |
parent | 2d1d89ee29e49412192b051412755610e0538198 (diff) | |
download | nextcloud-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.php | 26 |
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() { |