3
3
namespace Leantime \Core ;
4
4
5
5
use Exception ;
6
+ use Illuminate \Support \Facades \Cache ;
6
7
use Illuminate \Support \Str ;
7
8
use Symfony \Component \HttpFoundation \Cookie ;
8
9
use Symfony \Component \HttpFoundation \Response ;
@@ -167,14 +168,14 @@ public function isValidLanguage(string $langCode): bool
167
168
*/
168
169
public function readIni (): array
169
170
{
170
- if (session ( )->exists ('cache.language_resources_ ' . $ this ->language ) && $ this ->config ->debug == 0 ) {
171
- $ this ->ini_array = session ([ ' cache.language_resources_ ' . $ this ->language => self ::dispatch_filter (
171
+ if (Cache:: store ( ' installation ' )->has ('cache.language_resources_ ' . $ this ->language ) && $ this ->config ->debug == 0 ) {
172
+ $ this ->ini_array = Cache:: store ( ' installation ' )-> set ( ' cache.language_resources_ ' . $ this ->language , self ::dispatch_filter (
172
173
'language_resources ' ,
173
- session ('cache.language_resources_ ' . $ this ->language ),
174
+ Cache:: store ( ' installation ' )-> get ('cache.language_resources_ ' . $ this ->language ),
174
175
[
175
176
'language ' => $ this ->language ,
176
177
]
177
- )] );
178
+ ));
178
179
return $ this ->ini_array ;
179
180
}
180
181
@@ -206,7 +207,7 @@ public function readIni(): array
206
207
]
207
208
);
208
209
209
- session ([ 'cache.language_resources_ ' . $ this ->language => $ this ->ini_array ] );
210
+ Cache:: store ( " installation " )-> set ( 'cache.language_resources_ ' . $ this ->language , $ this ->ini_array );
210
211
211
212
return $ this ->ini_array ;
212
213
}
@@ -254,8 +255,8 @@ protected function includeOverrides(array $language, string $filepath, bool $for
254
255
*/
255
256
public function getLanguageList (): bool |array
256
257
{
257
- if (session ( )->exists ("cache.langlist " )) {
258
- return session ("cache.langlist " );
258
+ if (Cache:: store ( ' installation ' )->has ("cache.langlist " )) {
259
+ return Cache:: store ( ' installation ' )-> get ("cache.langlist " );
259
260
}
260
261
261
262
$ langlist = false ;
@@ -276,9 +277,9 @@ public function getLanguageList(): bool|array
276
277
}
277
278
278
279
$ parsedLangList = self ::dispatch_filter ('languages ' , $ langlist );
279
- session ([ "cache.langlist " => $ parsedLangList] );
280
+ Cache:: store ( ' installation ' )-> set ( "cache.langlist " , $ parsedLangList );
280
281
281
- return session ( " cache.langlist " ) ;
282
+ return $ parsedLangList ;
282
283
}
283
284
284
285
/**
0 commit comments