Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CarnetApp/CarnetNextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhie <phie@phie.ovh>2019-08-17 18:33:52 +0300
committerPhie <phie@phie.ovh>2019-08-17 18:33:52 +0300
commit249216f58c1a7f394f7f5e88f04d79dd3d3376ab (patch)
tree7a80c3e0b367077d33d41288664b906290c97a24
parent256774c2de59b5190ed49637776636fe44522da9 (diff)
cache for languages
-rwxr-xr-xlib/Controller/NoteController.php7
m---------templates/CarnetElectron0
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php
index 006ef61..6874008 100755
--- a/lib/Controller/NoteController.php
+++ b/lib/Controller/NoteController.php
@@ -245,8 +245,11 @@
* @NoCSRFRequired
*/
public function getLangJson($lang){
- if($lang !== ".." && $lang !== "../")
- return new StreamResponse(__DIR__.'/../../templates/CarnetElectron/i18n/'.$lang.".json");
+ if($lang !== ".." && $lang !== "../"){
+ $response = new StreamResponse(__DIR__.'/../../templates/CarnetElectron/i18n/'.$lang.".json");
+ $response->cacheFor(604800);
+ return $response;
+ }
else
die();
}
diff --git a/templates/CarnetElectron b/templates/CarnetElectron
-Subproject 5c8f72a2a799102a8c4fdfa15b146a5ed63572a
+Subproject 1c46bfb8ae4f726e0d0a6c742bd2b4a4a5c4d02