From c59dd7705165050f44b4dd020beb16aac6f64583 Mon Sep 17 00:00:00 2001 From: pwolanin Date: Mon, 13 Feb 2012 13:58:11 -0500 Subject: [PATCH] Restore the has_js cookie for authenticated users --- includes/common.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/common.inc b/includes/common.inc index 43f05d4c6df..814a08b1ffc 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -2180,6 +2180,12 @@ function drupal_add_js($data = NULL, $type = 'module', $scope = 'header', $defer ), 'inline' => array(), ); + // We never cache authenticated user pages, so if they are logged in we + // allow setting of the has_js cookie so batch API functions use the JS + // version. + if (!user_is_anonymous()) { + $javascript['footer']['inline'][] = array('code' => "document.cookie = 'has_js=1; path=/';", 'defer' => TRUE); + } } if (isset($scope) && !isset($javascript[$scope])) {