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:
Diffstat (limited to 'templates/writer.php')
-rwxr-xr-xtemplates/writer.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/templates/writer.php b/templates/writer.php
index 7e449c8..b0f0e99 100755
--- a/templates/writer.php
+++ b/templates/writer.php
@@ -1,7 +1,10 @@
<?php
$currentpath = __DIR__."/CarnetElectron/";
$root = \OCP\Util::linkToAbsolute("carnet","templates");
-
+if(strpos($root,"http://") === 0 && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'){
+ //should be https...
+ $root = "https".substr($root,strlen("http"));
+}
$file = file_get_contents($currentpath."reader/reader.html");
$file = str_replace("<!ROOTPATH>", $root."/CarnetElectron/", $file);