diff options
author | Phie <phie@phie.ovh> | 2018-12-04 16:20:56 +0300 |
---|---|---|
committer | Phie <phie@phie.ovh> | 2018-12-04 16:20:56 +0300 |
commit | 2db4f8a2146aaa0776dbf282b7ea9917445271ff (patch) | |
tree | fc5884ff3d767b680d1bf50862f884611395734c | |
parent | edb38eb7284d4632179105dffd1be0c7ec1f0ec9 (diff) |
-rwxr-xr-x | lib/Controller/NoteController.php | 19 | ||||
-rwxr-xr-x | templates/index.php | 2 |
2 files changed, 15 insertions, 6 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); + } } diff --git a/templates/index.php b/templates/index.php index d031aa8..9a7ff40 100755 --- a/templates/index.php +++ b/templates/index.php @@ -12,7 +12,7 @@ $file = str_replace("href=\"","href=\"".$root."/CarnetElectron/",$file); preg_match_all('/<script.*?src=\"(.*?\.js(?:\?.*?)?)"/si', $file, $matches, PREG_PATTERN_ORDER); for ($i = 0; $i < count($matches[1]); $i++) { - script("carnet","../templates/CarnetElectron/".substr($matches[1][$i],0,-3)); + script("carnet","../templates/CarnetElectron/".substr($matches[1][$i],0,-3)."?t=".time()); } if($_['carnet_display_fullscreen']==="yes") script("carnet","../templates/CarnetElectron/compatibility/nextcloud/browser_fullscreen"); |