| 43 | | // get the version, otherwise set to the current time |
|---|
| 44 | | // so each time the cache is cleared then the image are reload from the webserver |
|---|
| 45 | | $version = sfConfig::get('app_swCombine_asset_version', strtotime('now')); |
|---|
| 46 | | |
|---|
| 47 | | $pattern = '/url\(("|\'|)(.*)("|\'|)\)/smU'; |
|---|
| 48 | | $replacement = "url(\${2}?${version})"; |
|---|
| 49 | | |
|---|
| 50 | | $contents = preg_replace($pattern, $replacement, $contents, -1); |
|---|
| | 45 | // get the version so each time the cache is cleared then the image are reload |
|---|
| | 46 | // from the webserver |
|---|
| | 47 | $params = sfConfig::get('app_swToolbox_swCombine', array('version' => false)); |
|---|
| | 48 | $version = $params['version']; |
|---|
| | 49 | if($version) |
|---|
| | 50 | { |
|---|
| | 51 | $pattern = '/url\(("|\'|)(.*)("|\'|)\)/smU'; |
|---|
| | 52 | $replacement = "url(\${2}?_sw=${version})"; |
|---|
| | 53 | |
|---|
| | 54 | $contents = preg_replace($pattern, $replacement, $contents, -1); |
|---|
| | 55 | } |
|---|