aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Web
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-04-20 22:17:02 -0700
committerredmatrix <git@macgirvin.com>2016-04-20 22:17:02 -0700
commit5eb594706bf54781a94438a26c8e574682d51128 (patch)
tree67388d7f4a94d3caea6b9179e851445e06d55f4e /Zotlabs/Web
parent2b0a04ea9e91196e2966844be0f6b673bd87f032 (diff)
downloadvolse-hubzilla-5eb594706bf54781a94438a26c8e574682d51128.tar.gz
volse-hubzilla-5eb594706bf54781a94438a26c8e574682d51128.tar.bz2
volse-hubzilla-5eb594706bf54781a94438a26c8e574682d51128.zip
make the cookie check agnostic to cookie state
Diffstat (limited to 'Zotlabs/Web')
-rw-r--r--Zotlabs/Web/CheckJS.php8
1 files changed, 3 insertions, 5 deletions
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" . '<script>document.cookie="jsdisabled=0; path=/"; var jsMatch = /\&jsdisabled=0/; if (!jsMatch.exec(location.href)) { location.href = "' . z_root() . '/nojs/0?f=&redir=' . $page . '" ; }</script>' . "\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'];
}
}
}