diff options
author | Phie <phie@phie.ovh> | 2019-04-17 18:23:01 +0300 |
---|---|---|
committer | Phie <phie@phie.ovh> | 2019-04-17 18:23:01 +0300 |
commit | 8c064a8933a7197396d4b65e679652e8f34d093d (patch) | |
tree | a3e2ac9d33eac7c8745d6802171287bc3bebdeed | |
parent | c98bc44129bcb549a271dfe59ae384de8ef452cd (diff) |
method to save and restore sort settings
-rwxr-xr-x | appinfo/routes.php | 2 | ||||
-rwxr-xr-x | lib/Controller/NoteController.php | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/appinfo/routes.php b/appinfo/routes.php index ce2b285..2806ae6 100755 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -55,6 +55,8 @@ return [ ['name' => 'note#getMaterialFont', 'url' => '/templates/CarnetElectron/fonts/material-icons.woff2', 'verb' => 'GET' ], ['name' => 'note#getChangelog', 'url' => '/settings/changelog', 'verb' => 'GET' ], ['name' => 'note#getLangJson', 'url' => '/settings/lang/json', 'verb' => 'GET' ], + ['name' => 'note#getBrowserSettings', 'url' => '/settings/browser', 'verb' => 'GET' ], + ['name' => 'note#setBrowserSettings', 'url' => '/settings/browser', 'verb' => 'POST' ], ] ];
\ No newline at end of file diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php index 25e57fb..c67017f 100755 --- a/lib/Controller/NoteController.php +++ b/lib/Controller/NoteController.php @@ -147,6 +147,21 @@ } return substr($this->CarnetFolder->getInternalPath(),6); } + + /** + * @NoAdminRequired + */ + public function setBrowserSettings($jsonSettings) { + $this->Config->setUserValue($this->userId, $this->appName,"browser_settings",$jsonSettings); + } + + /** + * @NoAdminRequired + */ + public function getBrowserSettings() { + return $this->Config->getUserValue($this->userId, $this->appName,"browser_settings"); + } + private function getRecentFile(){ try { return $this->CarnetFolder->get("quickdoc/recentdb/recentnc"); |