|
39 | 39 | use OCP\Image; |
40 | 40 | use OCP\IUserManager; |
41 | 41 | use OCP\Notification\IManager as INotificationManager; |
| 42 | +use OCP\Share\IManager; |
42 | 43 |
|
43 | 44 | /** |
44 | 45 | * Manager |
@@ -82,32 +83,29 @@ class Manager { |
82 | 83 | * @var CappedMemoryCache $usersByUid |
83 | 84 | */ |
84 | 85 | protected $usersByUid; |
| 86 | + /** @var IManager */ |
| 87 | + private $shareManager; |
85 | 88 |
|
86 | | - /** |
87 | | - * @param IConfig $ocConfig |
88 | | - * @param \OCA\User_LDAP\FilesystemHelper $ocFilesystem object that |
89 | | - * gives access to necessary functions from the OC filesystem |
90 | | - * @param \OCA\User_LDAP\LogWrapper $ocLog |
91 | | - * @param IAvatarManager $avatarManager |
92 | | - * @param Image $image an empty image instance |
93 | | - * @param IDBConnection $db |
94 | | - * @throws \Exception when the methods mentioned above do not exist |
95 | | - */ |
96 | | - public function __construct(IConfig $ocConfig, |
97 | | - FilesystemHelper $ocFilesystem, LogWrapper $ocLog, |
98 | | - IAvatarManager $avatarManager, Image $image, |
99 | | - IDBConnection $db, IUserManager $userManager, |
100 | | - INotificationManager $notificationManager) { |
| 89 | + public function __construct( |
| 90 | + IConfig $ocConfig, |
| 91 | + FilesystemHelper $ocFilesystem, |
| 92 | + LogWrapper $ocLog, |
| 93 | + IAvatarManager $avatarManager, |
| 94 | + Image $image, |
| 95 | + IUserManager $userManager, |
| 96 | + INotificationManager $notificationManager, |
| 97 | + IManager $shareManager |
| 98 | + ) { |
101 | 99 | $this->ocConfig = $ocConfig; |
102 | 100 | $this->ocFilesystem = $ocFilesystem; |
103 | 101 | $this->ocLog = $ocLog; |
104 | 102 | $this->avatarManager = $avatarManager; |
105 | 103 | $this->image = $image; |
106 | | - $this->db = $db; |
107 | 104 | $this->userManager = $userManager; |
108 | 105 | $this->notificationManager = $notificationManager; |
109 | 106 | $this->usersByDN = new CappedMemoryCache(); |
110 | 107 | $this->usersByUid = new CappedMemoryCache(); |
| 108 | + $this->shareManager = $shareManager; |
111 | 109 | } |
112 | 110 |
|
113 | 111 | /** |
@@ -229,8 +227,9 @@ public function getDeletedUser($id) { |
229 | 227 | return new OfflineUser( |
230 | 228 | $id, |
231 | 229 | $this->ocConfig, |
232 | | - $this->db, |
233 | | - $this->access->getUserMapper()); |
| 230 | + $this->access->getUserMapper(), |
| 231 | + $this->shareManager |
| 232 | + ); |
234 | 233 | } |
235 | 234 |
|
236 | 235 | /** |
|
0 commit comments