@@ -28,7 +28,6 @@ class NotesController extends Controller {
28
28
private IConfig $ settings ;
29
29
private IL10N $ l10n ;
30
30
private IMimeTypeDetector $ mimeTypeDetector ;
31
- private string $ userId ;
32
31
33
32
public function __construct (
34
33
string $ AppName ,
@@ -39,8 +38,7 @@ public function __construct(
39
38
Helper $ helper ,
40
39
IConfig $ settings ,
41
40
IL10N $ l10n ,
42
- IMimeTypeDetector $ mimeTypeDetector ,
43
- string $ userId
41
+ IMimeTypeDetector $ mimeTypeDetector
44
42
) {
45
43
parent ::__construct ($ AppName , $ request );
46
44
$ this ->notesService = $ notesService ;
@@ -50,7 +48,6 @@ public function __construct(
50
48
$ this ->settings = $ settings ;
51
49
$ this ->l10n = $ l10n ;
52
50
$ this ->mimeTypeDetector = $ mimeTypeDetector ;
53
- $ this ->userId = $ userId ;
54
51
}
55
52
56
53
/**
@@ -350,11 +347,11 @@ public function uploadFile(int $noteid): JSONResponse {
350
347
}
351
348
352
349
private function inLockScope (Note $ note , callable $ callback ) {
353
- $ isRichText = $ this ->settingsService ->get ($ this ->userId , 'noteMode ' ) === 'rich ' ;
350
+ $ isRichText = $ this ->settingsService ->get ($ this ->helper -> getUID () , 'noteMode ' ) === 'rich ' ;
354
351
$ lockContext = new LockContext (
355
352
$ note ->getFile (),
356
353
$ isRichText ? ILock::TYPE_APP : ILock::TYPE_USER ,
357
- $ isRichText ? 'text ' : $ this ->userId
354
+ $ isRichText ? 'text ' : $ this ->helper -> getUID ()
358
355
);
359
356
$ this ->lockManager ->runInScope ($ lockContext , function () use ($ callback ) {
360
357
$ callback ();
0 commit comments