From a5286ba8d1b694d177a71f7fa5dd56a678af2d6c Mon Sep 17 00:00:00 2001 From: Phie Date: Fri, 26 Apr 2019 18:39:46 +0200 Subject: now working with owncloud --- templates/index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/index.php b/templates/index.php index e6a1d0b..c64887e 100755 --- a/templates/index.php +++ b/templates/index.php @@ -28,7 +28,11 @@ else { if($_['nc_version']>=14) style("carnet","../templates/CarnetElectron/compatibility/nextcloud/nc14-header"); } -$file = str_replace("src=\"","defer nonce='".\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()."' src=\"".$root."/CarnetElectron/",$file); +$nonce = ""; +if (method_exists(\OC::$server, "getContentSecurityPolicyNonceManager")){ + $nonce = \OC::$server->getContentSecurityPolicyNonceManager()->getNonce(); +} +$file = str_replace("src=\"","defer nonce='".$nonce."' src=\"".$root."/CarnetElectron/",$file); echo $file; echo "".$root."/CarnetElectron/"; ?> \ No newline at end of file -- cgit v1.2.3