Permalink
Browse files

Added a timestamp after the linklist-file so it won't get cached by t…

…he browser.
  • Loading branch information...
1 parent c969b29 commit af965ec275b280bc974a0cd0cc8c005d5d8d185f @tijsverkoyen tijsverkoyen committed Mar 24, 2012
Showing with 3 additions and 1 deletion.
  1. +1 −0 CHANGELOG.md
  2. +2 −1 backend/core/engine/form.php
View
@@ -3,6 +3,7 @@
Improvements:
* Core: upgraded jQuery to 1.7.2
+* Pages: added a timestamp after the linklist-file so it won't get cached by the browser.
Bugfixes:
@@ -240,7 +240,8 @@ public function addEditor($name, $value = null, $class = null, $classError = nul
// add the internal link lists-file
if(SpoonFile::exists(FRONTEND_CACHE_PATH . '/navigation/editor_link_list_' . BL::getWorkingLanguage() . '.js'))
{
- $this->header->addJS('/frontend/cache/navigation/editor_link_list_' . BL::getWorkingLanguage() . '.js', null, false, false, true);
+ $timestamp = @filemtime(FRONTEND_CACHE_PATH . '/navigation/editor_link_list_' . BL::getWorkingLanguage() . '.js');
+ $this->header->addJS('/frontend/cache/navigation/editor_link_list_' . BL::getWorkingLanguage() . '.js?m=' . $timestamp, null, false, false, true);
}
// create and return a textarea for the editor

0 comments on commit af965ec

Please sign in to comment.