diff options
author | robocoder <anthon.pang@gmail.com> | 2010-09-05 22:14:28 +0400 |
---|---|---|
committer | robocoder <anthon.pang@gmail.com> | 2010-09-05 22:14:28 +0400 |
commit | 3e8d256ec2ade95f05a6138be345d620832f8981 (patch) | |
tree | 6c908230442103663953a0db6a4037497eb5810e /core/SmartyPlugins | |
parent | 54896f06bfe340c2177e29cdf788fc0d2d5a94cd (diff) |
fix regression in r3056; thanks Julien
git-svn-id: http://dev.piwik.org/svn/trunk@3062 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/SmartyPlugins')
-rw-r--r-- | core/SmartyPlugins/outputfilter.cachebuster.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/SmartyPlugins/outputfilter.cachebuster.php b/core/SmartyPlugins/outputfilter.cachebuster.php index 671f6531ce..d598d6c6bc 100644 --- a/core/SmartyPlugins/outputfilter.cachebuster.php +++ b/core/SmartyPlugins/outputfilter.cachebuster.php @@ -25,7 +25,7 @@ * <code>$smarty->load_filter('output','cachebuster');</code> * from application. * @author Anthon Pang <apang at softwaredevelopment dot ca> - * @version 1.0 + * @version 1.1 * @param string * @param Smarty */ @@ -38,12 +38,14 @@ function smarty_outputfilter_cachebuster($source, &$smarty) '~<script type=[\'"]text/javascript[\'"] src=[\'"]([^\'"]+)[\'"]>~', '~<script src=[\'"]([^\'"]+)[\'"] type=[\'"]text/javascript[\'"]>~', '~<link rel=[\'"]stylesheet[\'"] type=[\'"]text/css[\'"] href=[\'"]([^\'"]+)[\'"] ?/?>~', + '~(src|href)=\"index.php\?module=([A-Za-z0-9_]+)&action=([A-Za-z0-9_]+)\?piwik=~', ); $replace = array( '<script type="text/javascript" src="$1?'. $tag .'">', '<script type="text/javascript" src="$1?'. $tag .'">', '<link rel="stylesheet" type="text/css" href="$1?'. $tag .'" />', + '$1="index.php?module=$2&action=$3&piwik=', ); return preg_replace($pattern, $replace, $source); |