diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-03-16 12:18:01 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-03-16 12:18:01 +0100 |
commit | 72632ad402bd905107db836ed0f9bfae825d6c52 (patch) | |
tree | 509bb82f2db24bb5d27bd4dea2b926f68ff8dddc /apps/files_external/lib/config.php | |
parent | fb4cf532533d99abfd1b4f40ef6319d484f6ef85 (diff) | |
download | nextcloud-server-72632ad402bd905107db836ed0f9bfae825d6c52.tar.gz nextcloud-server-72632ad402bd905107db836ed0f9bfae825d6c52.zip |
Generate storage config ids when missing
When reading in old mount.json files, they do not contain config ids.
Since these are needed to be able to use the UI and the new service
classes, these will be generated automatically.
The config grouping is based on a config hash.
Diffstat (limited to 'apps/files_external/lib/config.php')
-rw-r--r-- | apps/files_external/lib/config.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index 23750dbb3fa..884e596bdd4 100644 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -894,12 +894,14 @@ class OC_Mount_Config { * This is mostly used to find out whether configurations * are the same. */ - private static function makeConfigHash($config) { + public static function makeConfigHash($config) { $data = json_encode( array( 'c' => $config['class'], 'm' => $config['mountpoint'], - 'o' => $config['options'] + 'o' => $config['options'], + 'p' => isset($config['priority']) ? $config['priority'] : -1, + 'mo' => isset($config['mountOptions']) ? $config['mountOptions'] : [], ) ); return hash('md5', $data); |