From 05c20c778190696c2f95e1a4f04bc51dafe811d1 Mon Sep 17 00:00:00 2001 From: Gerhard Killesreiter Date: Wed, 15 Mar 2006 08:46:57 +0000 Subject: #54002, Cached JS files break new drupal js error reporting behavior. Improved patch by chx --- includes/common.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'includes') diff --git a/includes/common.inc b/includes/common.inc index ef000ecf5..c6fe6dd05 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1145,15 +1145,16 @@ function drupal_add_link($attributes) { * it adds "misc/drupal.js" to the output. Other scripts * depends on the 'killswitch' inside it. */ -function drupal_add_js($file) { +function drupal_add_js($file, $nocache = FALSE) { static $sent = array(); + $postfix = $nocache ? '?'. time() : ''; if (!isset($sent['misc/drupal.js'])) { - drupal_set_html_head(''); + drupal_set_html_head(''); $sent['misc/drupal.js'] = true; } if (!isset($sent[$file])) { - drupal_set_html_head(''); + drupal_set_html_head(''); $sent[$file] = true; } } -- cgit v1.2.3