Only load personal external storages for allowed backends

remotes/origin/fix-10825
Robin Appelman 11 years ago
parent 8e6409a932
commit 73607e5d16
  1. 16
      apps/files_external/lib/config.php

@ -238,17 +238,21 @@ class OC_Mount_Config {
}
}
$personalBackends = self::getPersonalBackends();
// Load personal mount points
$mountConfig = self::readData($user);
if (isset($mountConfig[self::MOUNT_TYPE_USER][$user])) {
foreach ($mountConfig[self::MOUNT_TYPE_USER][$user] as $mountPoint => $options) {
$options['personal'] = true;
$options['options'] = self::decryptPasswords($options['options']);
if (isset($personalBackends[$options['class']])) {
$options['personal'] = true;
$options['options'] = self::decryptPasswords($options['options']);
// Always override previous config
$options['priority_type'] = self::MOUNT_TYPE_PERSONAL;
$options['backend'] = $backends[$options['class']]['backend'];
$mountPoints[$mountPoint] = $options;
// Always override previous config
$options['priority_type'] = self::MOUNT_TYPE_PERSONAL;
$options['backend'] = $backends[$options['class']]['backend'];
$mountPoints[$mountPoint] = $options;
}
}
}

Loading…
Cancel
Save