@@ -35,7 +35,7 @@ public function getAll(string $userId, bool $autoCreateNotesFolder = false, ?boo
35
35
try {
36
36
$ notesFolder = $ this ->getNotesFolder ($ userId , $ autoCreateNotesFolder );
37
37
if ($ showHidden === null ) {
38
- $ showHidden = $ this ->settings ->get ($ userId , 'showHidden ' );
38
+ $ showHidden = $ this ->settings ->getValueBool ($ userId , 'showHidden ' );
39
39
}
40
40
$ data = self ::gatherNoteFiles ($ customExtension , $ notesFolder , $ showHidden );
41
41
$ fileIds = array_keys ($ data ['files ' ]);
@@ -69,7 +69,7 @@ public function countNotes(string $userId) : int {
69
69
$ customExtension = $ this ->getCustomExtension ($ userId );
70
70
try {
71
71
$ notesFolder = $ this ->getNotesFolder ($ userId , false );
72
- $ showHidden = $ this ->settings ->get ($ userId , 'showHidden ' );
72
+ $ showHidden = $ this ->settings ->getValueBool ($ userId , 'showHidden ' );
73
73
$ data = self ::gatherNoteFiles ($ customExtension , $ notesFolder , $ showHidden );
74
74
return count ($ data ['files ' ]);
75
75
} catch (NotesFolderException $ e ) {
@@ -132,9 +132,9 @@ public function create(string $userId, string $title, string $category) : Note {
132
132
$ this ->noteUtil ->ensureSufficientStorage ($ folder , 1 );
133
133
134
134
// get file name
135
- $ fileSuffix = $ this ->settings ->get ($ userId , 'fileSuffix ' );
135
+ $ fileSuffix = $ this ->settings ->getValueString ($ userId , 'fileSuffix ' );
136
136
if ($ fileSuffix === 'custom ' ) {
137
- $ fileSuffix = $ this ->settings ->get ($ userId , 'customSuffix ' );
137
+ $ fileSuffix = $ this ->settings ->getValueString ($ userId , 'customSuffix ' );
138
138
}
139
139
$ filename = $ this ->noteUtil ->generateFileName ($ folder , $ title , $ fileSuffix , -1 );
140
140
// create file
@@ -211,7 +211,7 @@ private static function isNote(FileInfo $file, string $customExtension) : bool {
211
211
* Retrieve the value of user defined files extension
212
212
*/
213
213
private function getCustomExtension (string $ userId ) {
214
- $ suffix = $ this ->settings ->get ($ userId , 'customSuffix ' );
214
+ $ suffix = $ this ->settings ->getValueString ($ userId , 'customSuffix ' );
215
215
return ltrim ($ suffix , '. ' );
216
216
}
217
217
0 commit comments