Added patch from 'biesbjerg' corrects timestamps not being applied to Vendors css and js. Closes #5045

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7325 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mark_story 2008-07-07 01:19:41 +00:00
parent 3713fe25ae
commit e20944a976
2 changed files with 2 additions and 0 deletions

View file

@ -346,6 +346,7 @@ class HtmlHelper extends AppHelper {
$path .= '.css'; $path .= '.css';
} }
if ((Configure::read('Asset.timestamp') === true && Configure::read() > 0) || Configure::read('Asset.timestamp') === 'force') { if ((Configure::read('Asset.timestamp') === true && Configure::read() > 0) || Configure::read('Asset.timestamp') === 'force') {
$path = $this->webroot($path);
$path .= '?' . @filemtime(WWW_ROOT . str_replace('/', DS, $path)); $path .= '?' . @filemtime(WWW_ROOT . str_replace('/', DS, $path));
} }
} }

View file

@ -264,6 +264,7 @@ class JavascriptHelper extends AppHelper {
$url .= '.js'; $url .= '.js';
} }
if ((Configure::read('Asset.timestamp') === true && Configure::read() > 0) || Configure::read('Asset.timestamp') === 'force') { if ((Configure::read('Asset.timestamp') === true && Configure::read() > 0) || Configure::read('Asset.timestamp') === 'force') {
$url = $this->webroot($url);
$url .= '?' . @filemtime(WWW_ROOT . str_replace('/', DS, $url)); $url .= '?' . @filemtime(WWW_ROOT . str_replace('/', DS, $url));
} }
} }