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.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/templates/writer.php b/templates/writer.php
index ee6606d..3c9cb8f 100755
--- a/templates/writer.php
+++ b/templates/writer.php
@@ -16,6 +16,15 @@ $file = preg_replace_callback('/<script(.*?)src=\"(.*?\.js(?:\?.*?)?)"/s',functi
$relativePath = str_replace("<!ROOTPATH>", "", $matches[2]);
return "<script".$matches[1]."src=\"".$src."?mtime=".filemtime($currentpath.$relativePath)."\"";
}, $file);
+
+$file = preg_replace_callback('/<link(.*?)href=\"(.*?\.css(?:\?.*?)?)"/s',function ($matches) {
+ global $currentpath;
+ global $root;
+ $src = str_replace("<!ROOTPATH>", $root."/CarnetElectron/", $matches[2]);
+ $relativePath = str_replace("<!ROOTPATH>", "", $matches[2]);
+ return "<link".$matches[1]."href=\"".$src."?mtime=".filemtime($currentpath.$relativePath)."\"";
+}, $file);
+
$file = str_replace("<!ROOTPATH>", $root."/CarnetElectron/", $file);
$root = substr(__DIR__, strlen($_SERVER['DOCUMENT_ROOT']));