Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PhieF committed Dec 4, 2018
1 parent edb38eb commit 2db4f8a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
19 changes: 14 additions & 5 deletions lib/Controller/NoteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -782,25 +782,34 @@ public function setAppTheme($url){
* @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);
}

/**
* @NoAdminRequired
* @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);
}


/**
* @NoAdminRequired
* @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);
}


}
Expand Down
2 changes: 1 addition & 1 deletion templates/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

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");
Expand Down

0 comments on commit 2db4f8a

Please sign in to comment.