Created
September 13, 2012 11:50
-
-
Save mattattui/3713822 to your computer and use it in GitHub Desktop.
Revisions
-
mattattui created this gist
Sep 13, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ app: # ... resource_version: <?php echo date_create()->format('YmdHis'); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ <?php function include_stylesheets_versioned() { $response = sfContext::getInstance()->getResponse(); sfConfig::set('symfony.asset.stylesheets_included', true); $html = ''; foreach ($response->getStylesheets() as $file => $options) { if ((strpos($file, '?') === false) && (stripos($file, 'http') !== 0) ) { $file .= '?v='.sfConfig::get('app_resource_version'); } $html .= stylesheet_tag($file, $options); } echo $html; } function include_javascripts_versioned() { $response = sfContext::getInstance()->getResponse(); sfConfig::set('symfony.asset.javascripts_included', true); $html = ''; foreach ($response->getJavascripts() as $file => $options) { if ((strpos($file, '?') === false) && (stripos($file, 'http') !== 0) ) { $file .= '?v='.sfConfig::get('app_resource_version'); } $html .= javascript_include_tag($file, $options); } echo $html; }