Skip to content

Commit

Permalink
better inject for groupfolder
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <[email protected]>
  • Loading branch information
ArtificialOwl committed Aug 19, 2024
1 parent 4afe47d commit 5e042e7
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions lib/Service/GroupFoldersService.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@
use OCA\Files_FullTextSearch\Tools\Traits\TArrayTools;
use OCA\GroupFolders\Folder\FolderManager;
use OCP\App\IAppManager;
use OCP\Files\IMimeTypeLoader;
use OCP\Files\Node;
use OCP\FullTextSearch\Model\IIndex;
use OCP\IDBConnection;
use OCP\IGroupManager;
use Psr\Log\LoggerInterface;

Expand All @@ -53,9 +51,7 @@ class GroupFoldersService {
private array $groupFolders = [];

public function __construct(
IDBConnection $dbConnection,
IAppManager $appManager,
IMimeTypeLoader $mimeTypeLoader,
private IGroupManager $groupManager,
private LocalFilesService $localFilesService,
ConfigService $configService,
Expand All @@ -64,14 +60,8 @@ public function __construct(
if ($configService->getAppValue(ConfigService::FILES_GROUP_FOLDERS) === '1'
&& $appManager->isEnabledForUser('groupfolders')) {
try {
$this->folderManager = new FolderManager(
$dbConnection,
$groupManager,
$mimeTypeLoader,
$logger
);
} catch (Exception $e) {
return;
$this->folderManager = \OCP\Server::get(FolderManager::class);
} catch (Exception) {
}
}
}
Expand Down

0 comments on commit 5e042e7

Please sign in to comment.