Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions apps/files_external/lib/Config/ConfigAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
use OC\Files\Storage\Wrapper\Availability;
use OCA\Files_External\Lib\PersonalMount;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\Migration\StorageMigrator;
use OCA\Files_External\Service\UserGlobalStoragesService;
use OCA\Files_External\Service\UserStoragesService;
use OCP\Files\Config\IMountProvider;
Expand All @@ -52,22 +51,17 @@ class ConfigAdapter implements IMountProvider {

/** @var UserGlobalStoragesService */
private $userGlobalStoragesService;
/** @var StorageMigrator */
private $migrator;

/**
* @param UserStoragesService $userStoragesService
* @param UserGlobalStoragesService $userGlobalStoragesService
* @param StorageMigrator $migrator
*/
public function __construct(
UserStoragesService $userStoragesService,
UserGlobalStoragesService $userGlobalStoragesService,
StorageMigrator $migrator
UserGlobalStoragesService $userGlobalStoragesService
) {
$this->userStoragesService = $userStoragesService;
$this->userGlobalStoragesService = $userGlobalStoragesService;
$this->migrator = $migrator;
}

/**
Expand Down Expand Up @@ -120,8 +114,6 @@ private function constructStorage(StorageConfig $storageConfig) {
* @return \OCP\Files\Mount\IMountPoint[]
*/
public function getMountsForUser(IUser $user, IStorageFactory $loader) {
$this->migrator->migrateUser($user);

$this->userStoragesService->setUser($user);
$this->userGlobalStoragesService->setUser($user);

Expand Down
135 changes: 0 additions & 135 deletions apps/files_external/lib/Migration/StorageMigrator.php

This file was deleted.

24 changes: 1 addition & 23 deletions apps/files_external/lib/MountConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
use OCA\Files_External\Service\UserGlobalStoragesService;
use OCA\Files_External\Service\UserStoragesService;
use OCP\Files\StorageNotAvailableException;
use OCP\IUser;
use phpseclib\Crypt\AES;

/**
Expand Down Expand Up @@ -144,29 +145,6 @@ public static function getBackendStatus($class, $options, $isPersonal, $testOnly
return StorageNotAvailableException::STATUS_ERROR;
}

/**
* Read the mount points in the config file into an array
*
* @param string|null $user If not null, personal for $user, otherwise system
* @return array
*/
public static function readData($user = null) {
if (isset($user)) {
$jsonFile = \OC::$server->getUserManager()->get($user)->getHome() . '/mount.json';
} else {
$config = \OC::$server->getConfig();
$datadir = $config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data/');
$jsonFile = $config->getSystemValue('mount_file', $datadir . '/mount.json');
}
if (is_file($jsonFile)) {
$mountPoints = json_decode(file_get_contents($jsonFile), true);
if (is_array($mountPoints)) {
return $mountPoints;
}
}
return [];
}

/**
* Get backend dependency message
* TODO: move into AppFramework along with templates
Expand Down
56 changes: 0 additions & 56 deletions apps/files_external/lib/Service/UserLegacyStoragesService.php

This file was deleted.