From 5eb594706bf54781a94438a26c8e574682d51128 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 20 Apr 2016 22:17:02 -0700 Subject: make the cookie check agnostic to cookie state --- Zotlabs/Web/CheckJS.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Zotlabs/Web') diff --git a/Zotlabs/Web/CheckJS.php b/Zotlabs/Web/CheckJS.php index 50af34a40..5f9856a8c 100644 --- a/Zotlabs/Web/CheckJS.php +++ b/Zotlabs/Web/CheckJS.php @@ -22,13 +22,11 @@ class CheckJS { if($test) { - logger('page=' . $page); - - if($_COOKIE['jsdisabled'] == 0) { + if(! array_key_exists('jsdisabled',$_COOKIE)) { \App::$page['htmlhead'] .= "\r\n" . '' . "\r\n"; /* emulate JS cookie if cookies are not accepted */ - if ($_GET['jsdisabled'] == 0) { - $_COOKIE['jsdisabled'] = 0; + if (array_key_exists('jsdisabled',$_GET)) { + $_COOKIE['jsdisabled'] = $_GET['jsdisabled']; } } } -- cgit v1.2.3