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/index.php')
-rwxr-xr-xtemplates/index.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/index.php b/templates/index.php
index a6375bd..b3e1d8f 100755
--- a/templates/index.php
+++ b/templates/index.php
@@ -9,8 +9,12 @@ if(strpos($root,"http://") === 0 && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS
}
$file = file_get_contents($currentpath."index.html");
//
-$file = str_replace("href=\"","href=\"".$root."/CarnetElectron/",$file);
+$file = preg_replace_callback('/<link(.*?)href=\"(.*?\.css(?:\?.*?)?)"/s',function ($matches) {
+ global $currentpath;
+ return "<link".$matches[1]."href=\"".$matches[2]."?mtime=".filemtime($currentpath.$matches[2])."\"";
+}, $file);
+$file = str_replace("href=\"","href=\"".$root."/CarnetElectron/",$file);
$file = preg_replace_callback('/<script(.*?)src=\"(.*?\.js(?:\?.*?)?)"/s',function ($matches) {
global $currentpath;