You are here

function authcache_ajax_test_set_has_js in Authenticated User Page Caching (Authcache) 7.2

Menu callback: Set has_js cookie.

1 string reference to 'authcache_ajax_test_set_has_js'
authcache_ajax_test_menu in modules/authcache_ajax/tests/authcache_ajax_test.module
Implements hook_menu().

File

modules/authcache_ajax/tests/authcache_ajax_test.module, line 36
Stub module for Authcache Ajax tests.

Code

function authcache_ajax_test_set_has_js($flag = FALSE) {
  if ($flag) {
    setcookie('has_js', '1', 0, base_path());
  }
  else {
    setcookie('has_js', '', time() - 3600, base_path());
  }
  drupal_exit();
}