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>2018-12-04 16:20:56 +0300
committerPhie <phie@phie.ovh>2018-12-04 16:20:56 +0300
commit2db4f8a2146aaa0776dbf282b7ea9917445271ff (patch)
treefc5884ff3d767b680d1bf50862f884611395734c
parentedb38eb7284d4632179105dffd1be0c7ec1f0ec9 (diff)
-rwxr-xr-xlib/Controller/NoteController.php19
-rwxr-xr-xtemplates/index.php2
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");