aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorgit-marijus <mario@mariovavti.com>2016-04-21 18:42:49 +0200
committergit-marijus <mario@mariovavti.com>2016-04-21 18:42:49 +0200
commitaa0c70e198007798385736f370fc07957764acf6 (patch)
tree98884b66527f73b1bf362a0cf0588ec01703b911 /include
parent5eb594706bf54781a94438a26c8e574682d51128 (diff)
parent6941fbb182dd7b91c2bc5c1de387affa746d97f6 (diff)
downloadvolse-hubzilla-aa0c70e198007798385736f370fc07957764acf6.tar.gz
volse-hubzilla-aa0c70e198007798385736f370fc07957764acf6.tar.bz2
volse-hubzilla-aa0c70e198007798385736f370fc07957764acf6.zip
Merge pull request #348 from git-marijus/dev
add querystring to css and js which is added via head_add_{css, js}
Diffstat (limited to 'include')
-rwxr-xr-xinclude/plugin.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/include/plugin.php b/include/plugin.php
index 8dceb8fb1..7df3e302c 100755
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -535,8 +535,11 @@ function format_css_if_exists($source) {
else
$path = theme_include($source[0]);
- if($path)
- return '<link rel="stylesheet" href="' . script_path() . '/' . $path . '" type="text/css" media="' . $source[1] . '">' . "\r\n";
+ if($path) {
+ $path = script_path() . '/' . $path;
+ $qstring = ((parse_url($path, PHP_URL_QUERY)) ? '&' : '?') . 'v=' . STD_VERSION;
+ return '<link rel="stylesheet" href="' . $path . $qstring . '" type="text/css" media="' . $source[1] . '">' . "\r\n";
+ }
}
/*
@@ -612,8 +615,11 @@ function format_js_if_exists($source) {
$path = $source;
else
$path = theme_include($source);
- if($path)
- return '<script src="' . script_path() . '/' . $path . '" ></script>' . "\r\n" ;
+ if($path) {
+ $path = script_path() . '/' . $path;
+ $qstring = ((parse_url($path, PHP_URL_QUERY)) ? '&' : '?') . 'v=' . STD_VERSION;
+ return '<script src="' . $path . $qstring . '" ></script>' . "\r\n" ;
+ }
}
@@ -678,4 +684,4 @@ function folder_exists($folder)
// If it exist, check if it's a directory
return (($path !== false) && is_dir($path)) ? $path : false;
-} \ No newline at end of file
+}