diff options
author | Phie <phie@phie.ovh> | 2019-04-26 19:39:46 +0300 |
---|---|---|
committer | Phie <phie@phie.ovh> | 2019-04-26 19:39:46 +0300 |
commit | a5286ba8d1b694d177a71f7fa5dd56a678af2d6c (patch) | |
tree | 10dc716d50c3eb59c291f3231b79fb11d1d1f175 /templates | |
parent | 2df6a769a6975c13f0641c833960975ae9328ce6 (diff) |
now working with owncloudv0.15.3
Diffstat (limited to 'templates')
-rwxr-xr-x | templates/index.php | 6 |
1 files changed, 5 insertions, 1 deletions
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 "<span style=\"display:none;\" id=\"root-url\">".$root."/CarnetElectron/</span>"; ?>
\ No newline at end of file |