summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/config.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-03-19 17:56:36 +0100
committerVincent Petry <pvince81@owncloud.com>2014-03-19 17:56:36 +0100
commit9116c39a829ef10745acea5f3e9a4d47433ffa47 (patch)
tree6696dd938a43d73f9dae223b3b17bb4dfe1c3753 /apps/files_external/lib/config.php
parent5b6c36347b63909f09a2738e96cbc0ae23fd4c61 (diff)
downloadnextcloud-server-9116c39a829ef10745acea5f3e9a4d47433ffa47.tar.gz
nextcloud-server-9116c39a829ef10745acea5f3e9a4d47433ffa47.zip
Fixed ext storage password field order issue
The old password field is now preserved in the JSON structure to make sure that the order is preserved. This is a quick fix until the UI is fixed to not rely on the PHP array key order.
Diffstat (limited to 'apps/files_external/lib/config.php')
-rwxr-xr-xapps/files_external/lib/config.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 6de7c91358c..9b2cb0d0b0e 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -50,6 +50,7 @@ class OC_Mount_Config {
*/
public static function getBackends() {
+ // FIXME: do not rely on php key order for the options order in the UI
$backends['\OC\Files\Storage\Local']=array(
'backend' => 'Local',
'configuration' => array(
@@ -649,7 +650,9 @@ class OC_Mount_Config {
private static function encryptPasswords($options) {
if (isset($options['password'])) {
$options['password_encrypted'] = self::encryptPassword($options['password']);
- unset($options['password']);
+ // do not unset the password, we want to keep the keys order
+ // on load... because that's how the UI currently works
+ $options['password'] = '';
}
return $options;
}