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:
Diffstat (limited to 'lib/Controller/NoteController.php')
-rwxr-xr-xlib/Controller/NoteController.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php
index 2efee68..ffc4b35 100755
--- a/lib/Controller/NoteController.php
+++ b/lib/Controller/NoteController.php
@@ -782,7 +782,10 @@
* @NoCSRFRequired
*/
public function getEditorCss(){
- return json_decode($this->Config->getUserValue($this->userId, $this->appName, "css_editor"));
+ $css = $this->Config->getUserValue($this->userId, $this->appName, "css_editor");
+ if(empty($css))
+ $css = "[]";
+ return json_decode($css);
}
/**
@@ -790,8 +793,11 @@
* @NoCSRFRequired
*/
public function getBrowserCss(){
- return json_decode($this->Config->getUserValue($this->userId, $this->appName, "css_browser"));
- }
+ $css = $this->Config->getUserValue($this->userId, $this->appName, "css_browser");
+ if(empty($css))
+ $css = "[]";
+ return json_decode($css);
+ }
/**
@@ -799,8 +805,11 @@
* @NoCSRFRequired
*/
public function getSettingsCss(){
- return json_decode($this->Config->getUserValue($this->userId, $this->appName, "css_settings"));
- }
+ $css = $this->Config->getUserValue($this->userId, $this->appName, "css_settings");
+ if(empty($css))
+ $css = "[]";
+ return json_decode($css);
+ }
}